Reset save timer before loading new rom (fixes #782)

This commit is contained in:
OV2 2022-09-01 16:07:31 +02:00
parent 8c0a4a4168
commit 8685db48a7
1 changed files with 5 additions and 0 deletions

View File

@ -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));