summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorMikael Brunnhede2019-05-06 13:26:17 +0200
committerMikael Brunnhede2019-05-06 13:26:17 +0200
commit25f5a184255518b92c5a9786312fb543fb6278d0 (patch)
tree6d0fc22ba7e247461a2e8f100e32b9357b7e5e9e /src
parent30841f5881b3b63e64680a502c541ac583bcccfd (diff)
downloadsnes9x2002-25f5a184255518b92c5a9786312fb543fb6278d0.tar.gz
snes9x2002-25f5a184255518b92c5a9786312fb543fb6278d0.tar.bz2
snes9x2002-25f5a184255518b92c5a9786312fb543fb6278d0.zip
Fix issue with save states caused by input lag fix.
Diffstat (limited to 'src')
-rw-r--r--src/cpuexec.c12
1 files changed, 11 insertions, 1 deletions
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);