X-Git-Url: https://notaz.gp2x.de/cgi-bin/gitweb.cgi?a=blobdiff_plain;f=libpcsxcore%2Fmisc.c;h=d52a931c805501f4593e0128aa23f49e32c841a7;hb=20196899e40390c7f43be2bc02d99c55062c310f;hp=7929dc76fc6b8aa64c4349c6d82beb1cf1a7280b;hpb=5b5680983b7b3dde95acfe42f58e748d9f7fe1cb;p=pcsx_rearmed.git diff --git a/libpcsxcore/misc.c b/libpcsxcore/misc.c index 7929dc76..d52a931c 100644 --- a/libpcsxcore/misc.c +++ b/libpcsxcore/misc.c @@ -28,7 +28,6 @@ #include "gpu.h" #include "ppf.h" #include "database.h" -#include "lightrec/plugin.h" #include char CdromId[10] = ""; @@ -609,10 +608,7 @@ int SaveState(const char *file) { f = SaveFuncs.open(file, "wb"); if (f == NULL) return -1; - new_dyna_before_save(); - - if (drc_is_lightrec() && Config.Cpu != CPU_INTERPRETER) - lightrec_plugin_sync_regs_to_pcsx(); + psxCpu->Notify(R3000ACPU_NOTIFY_BEFORE_SAVE, NULL); SaveFuncs.write(f, (void *)PcsxHeader, 32); SaveFuncs.write(f, (void *)&SaveVersion, sizeof(u32)); @@ -659,8 +655,6 @@ int SaveState(const char *file) { SaveFuncs.close(f); - new_dyna_after_save(); - return 0; } @@ -689,18 +683,14 @@ int LoadState(const char *file) { if (Config.HLE) psxBiosInit(); - if (!drc_is_lightrec() || Config.Cpu == CPU_INTERPRETER) - psxCpu->Reset(); SaveFuncs.seek(f, 128 * 96 * 3, SEEK_CUR); - SaveFuncs.read(f, psxM, 0x00200000); SaveFuncs.read(f, psxR, 0x00080000); SaveFuncs.read(f, psxH, 0x00010000); SaveFuncs.read(f, &psxRegs, offsetof(psxRegisters, gteBusyCycle)); psxRegs.gteBusyCycle = psxRegs.cycle; - if (drc_is_lightrec() && Config.Cpu != CPU_INTERPRETER) - lightrec_plugin_sync_regs_from_pcsx(); + psxCpu->Notify(R3000ACPU_NOTIFY_AFTER_LOAD, NULL); if (Config.HLE) psxBiosFreeze(0); @@ -803,6 +793,7 @@ int RecvPcsxInfo() { SysClose(); return -1; } psxCpu->Reset(); + psxCpu->Notify(R3000ACPU_NOTIFY_AFTER_LOAD, NULL); } return 0;