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 8d4539a844
commit 10e0ef005d
1 changed files with 3 additions and 1 deletions

View File

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