lightrec: Only sync register cache before savestate if using dynarec
authorPaul Cercueil <paul@crapouillou.net>
Wed, 27 Apr 2022 20:00:11 +0000 (21:00 +0100)
committerPaul Cercueil <paul@crapouillou.net>
Wed, 27 Apr 2022 20:01:23 +0000 (21:01 +0100)
Synchronizing Lightrec's register cache into PCSX' psxRegs variable must
be done only if using Lightrec, not when using PCSX' interpreter.

Signed-off-by: Paul Cercueil <paul@crapouillou.net>
libpcsxcore/misc.c

index b02ac6f..a07ab19 100644 (file)
@@ -624,7 +624,7 @@ int SaveState(const char *file) {
 
        new_dyna_before_save();
 
-       if (drc_is_lightrec())
+       if (drc_is_lightrec() && Config.Cpu != CPU_INTERPRETER)
                lightrec_plugin_prepare_save_state();
 
        SaveFuncs.write(f, (void *)PcsxHeader, 32);