From 43276709597c11e30665a552339350270fce83d5 Mon Sep 17 00:00:00 2001 From: bladeoner Date: Fri, 23 Sep 2022 08:38:52 +0200 Subject: [PATCH] Snes9x - Reset save timer before loading new rom (#1025) --- source/snes9x/memmap.cpp | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/source/snes9x/memmap.cpp b/source/snes9x/memmap.cpp index 251a91b..642dd04 100644 --- a/source/snes9x/memmap.cpp +++ b/source/snes9x/memmap.cpp @@ -39,6 +39,7 @@ #include "movie.h" #include "display.h" #include "sha256.h" +#include "snapshot.h" #ifdef GEKKO #include "../filebrowser.h" @@ -1419,6 +1420,8 @@ bool8 CMemory::LoadROM (const char *filename) if(!filename || !*filename) return FALSE; + S9xResetSaveTimer(FALSE); // reset oops timer here so that .oops file has rom name of previous rom + int32 totalFileSize; do @@ -1703,6 +1706,8 @@ bool8 CMemory::LoadMultiCartMem (const uint8 *sourceA, uint32 sourceASize, bool8 CMemory::LoadMultiCart (const char *cartA, const char *cartB) { + S9xResetSaveTimer(FALSE); // reset oops timer here so that .oops file has rom name of previous rom + memset(ROM, 0, MAX_ROM_SIZE); memset(&Multi, 0, sizeof(Multi));