From 8685db48a7a758425674c3804b259ea06ff046f8 Mon Sep 17 00:00:00 2001 From: OV2 Date: Thu, 1 Sep 2022 16:07:31 +0200 Subject: [PATCH] Reset save timer before loading new rom (fixes #782) --- memmap.cpp | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/memmap.cpp b/memmap.cpp index 1128f810..e7fd15e3 100644 --- a/memmap.cpp +++ b/memmap.cpp @@ -34,6 +34,7 @@ #include "movie.h" #include "display.h" #include "sha256.h" +#include "snapshot.h" #ifndef SET_UI_COLOR #define SET_UI_COLOR(r, g, b) ; @@ -1397,6 +1398,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 @@ -1672,6 +1675,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));