diff options
Diffstat (limited to 'src/mame/machine/vsnes.cpp')
-rw-r--r-- | src/mame/machine/vsnes.cpp | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/src/mame/machine/vsnes.cpp b/src/mame/machine/vsnes.cpp index f7595acba77..317608c8f55 100644 --- a/src/mame/machine/vsnes.cpp +++ b/src/mame/machine/vsnes.cpp @@ -375,6 +375,16 @@ WRITE8_MEMBER(vsnes_state::gun_in0_w) uint8_t realy = (int)y; + // update the screen if necessary + if (!m_ppu1->screen().vblank()) + { + int vpos = m_ppu1->screen().vpos(); + int hpos = m_ppu1->screen().hpos(); + + if (vpos > realy || (vpos == realy && hpos >= x)) + m_ppu1->screen().update_now(); + } + /* get the pixel at the gun position */ rgb_t col = m_ppu1->screen().pixel(x, realy); uint8_t bright = col.brightness(); |