Snes9x - Reset save timer before loading new rom (#1025)

This commit is contained in:
bladeoner 2022-09-23 08:38:52 +02:00 committed by GitHub
parent 3c0f05da3f
commit 4327670959
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -39,6 +39,7 @@
#include "movie.h" #include "movie.h"
#include "display.h" #include "display.h"
#include "sha256.h" #include "sha256.h"
#include "snapshot.h"
#ifdef GEKKO #ifdef GEKKO
#include "../filebrowser.h" #include "../filebrowser.h"
@ -1419,6 +1420,8 @@ bool8 CMemory::LoadROM (const char *filename)
if(!filename || !*filename) if(!filename || !*filename)
return FALSE; return FALSE;
S9xResetSaveTimer(FALSE); // reset oops timer here so that .oops file has rom name of previous rom
int32 totalFileSize; int32 totalFileSize;
do do
@ -1703,6 +1706,8 @@ bool8 CMemory::LoadMultiCartMem (const uint8 *sourceA, uint32 sourceASize,
bool8 CMemory::LoadMultiCart (const char *cartA, const char *cartB) 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(ROM, 0, MAX_ROM_SIZE);
memset(&Multi, 0, sizeof(Multi)); memset(&Multi, 0, sizeof(Multi));