Change where we break S9xMainLoop/Scan for input ("Brunnis lag fix")

This commit is contained in:
Brandon Wright 2017-11-22 12:12:41 -06:00
parent 162ccbb153
commit f6043b8cb5
1 changed files with 3 additions and 1 deletions

View File

@ -444,7 +444,6 @@ void S9xDoHEventProcessing (void)
ICPU.Frame++;
PPU.HVBeamCounterLatched = 0;
CPU.Flags |= SCAN_KEYS_FLAG;
}
// From byuu:
@ -474,6 +473,9 @@ void S9xDoHEventProcessing (void)
if (CPU.V_Counter == PPU.ScreenHeight + FIRST_VISIBLE_LINE) // VBlank starts from V=225(240).
{
S9xEndScreenRefresh();
CPU.Flags |= SCAN_KEYS_FLAG;
PPU.HDMA = 0;
// Bits 7 and 6 of $4212 are computed when read in S9xGetPPU.
#ifdef DEBUGGER