Also break out of S9xMainLoop in original location.

This commit is contained in:
Brandon Wright 2017-11-24 13:47:53 -06:00
parent 1369d724f7
commit 8313c51e81
1 changed files with 7 additions and 2 deletions

View File

@ -204,6 +204,7 @@
static inline void S9xReschedule (void);
static int endframe = 0;
void S9xMainLoop (void)
{
@ -314,13 +315,15 @@ void S9xMainLoop (void)
S9xPackStatus();
if (CPU.Flags & SCAN_KEYS_FLAG)
CPU.Flags &= ~SCAN_KEYS_FLAG;
if (endframe)
{
#ifdef DEBUGGER
if (!(CPU.Flags & FRAME_ADVANCE_FLAG))
#endif
S9xSyncSpeed();
CPU.Flags &= ~SCAN_KEYS_FLAG;
endframe = 0;
}
}
@ -443,7 +446,9 @@ void S9xDoHEventProcessing (void)
Timings.NMITriggerPos = 0xffff;
ICPU.Frame++;
endframe = 1;
PPU.HVBeamCounterLatched = 0;
CPU.Flags |= SCAN_KEYS_FLAG;
}
// From byuu: