X-Git-Url: https://notaz.gp2x.de/cgi-bin/gitweb.cgi?p=fceu.git;a=blobdiff_plain;f=fce.c;h=d3b5c63343c3f4cf623f889728fd91c5e49cf490;hp=1e82efb51a5f68dc1b64257a7a4182b4372792fe;hb=c0623dcfadb00843e43c0f8cdcb8898bfc1f08f5;hpb=078eb4c0d0ff99a90f5ea0f9a9dbf9ec780650cc diff --git a/fce.c b/fce.c index 1e82efb..d3b5c63 100644 --- a/fce.c +++ b/fce.c @@ -604,17 +604,25 @@ void FCEUI_FrameSkip(int x) static void LineUpdate(uint8 *target) { uint32 tem; + int y; /* PRefreshLine() will not get called on skipped frames. This * could cause a problem, but the solution would be rather complex, * due to the current sprite 0 hit code. */ - if(FSkip) return; + if(FSkip) + { + y=(int)SPRAM[0] + 1; + if(scanline==y && SpriteON) PPU_status|=0x40; // hack + return; + } if(scanline < FSettings.FirstSLine || scanline > FSettings.LastSLine) { if(PPU_hook) PRefreshLine(); + y=(int)SPRAM[0] + 1; + if(scanline==y && SpriteON) PPU_status|=0x40; } else { @@ -1382,6 +1390,12 @@ void EmLoop(void) } update: + if(Exit) + { + //CloseGame(); + break; + } + { int ssize; @@ -1405,12 +1419,6 @@ update: } } - if(Exit) - { - //CloseGame(); - break; - } - } // for }