mirror of
https://github.com/AppleWin/AppleWin.git
synced 2026-04-21 23:16:39 +00:00
Fixed save-state on exit not working if there was a VM restart (eg. config h/w change). Fixes #564
This commit is contained in:
@@ -637,17 +637,19 @@ void Snapshot_Startup()
|
||||
|
||||
Snapshot_LoadState();
|
||||
|
||||
bDone = true;
|
||||
bDone = true; // Prevents a g_bRestart from loading an old save-state
|
||||
}
|
||||
|
||||
void Snapshot_Shutdown()
|
||||
{
|
||||
static bool bDone = false;
|
||||
|
||||
_ASSERT(!bDone);
|
||||
_ASSERT(!g_bRestart);
|
||||
if(!g_bSaveStateOnExit || bDone)
|
||||
return;
|
||||
|
||||
Snapshot_SaveState();
|
||||
|
||||
bDone = true;
|
||||
bDone = true; // Debug flag: should only be called once, and never on a g_bRestart
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user