From 25f5a184255518b92c5a9786312fb543fb6278d0 Mon Sep 17 00:00:00 2001 From: Mikael Brunnhede Date: Mon, 6 May 2019 13:26:17 +0200 Subject: Fix issue with save states caused by input lag fix. --- src/cpuexec.c | 12 +++++++++++- 1 file changed, 11 insertions(+), 1 deletion(-) diff --git a/src/cpuexec.c b/src/cpuexec.c index 7102ade..950b7b9 100644 --- a/src/cpuexec.c +++ b/src/cpuexec.c @@ -384,6 +384,7 @@ S9xMainLoop(void) if (!finishedFrame) { #endif +#ifndef LAGFIX Registers.PC = CPU.PC - CPU.PCBase; #ifndef ASMCPU @@ -391,7 +392,7 @@ S9xMainLoop(void) #endif S9xAPUPackStatus(); - +#endif //if (CPU.Flags & SCAN_KEYS_FLAG) // { @@ -409,6 +410,15 @@ S9xMainLoop(void) else { finishedFrame = false; + + Registers.PC = CPU.PC - CPU.PCBase; + +#ifndef ASMCPU + S9xPackStatus(); +#endif + + S9xAPUPackStatus(); + break; } } while (!finishedFrame); -- cgit v1.2.3