mirror of
https://github.com/ARMSX2/ARMSX2.git
synced 2026-08-24 16:50:16 -07:00
SaveState: Reset VM when save state fails to load
This commit is contained in:
committed by
Connor McLaughlin
parent
c6cd6b5eb3
commit
2fc4d02dd6
@@ -1151,6 +1151,8 @@ bool SaveState_UnzipFromDisk(const std::string& filename, Error* error)
|
||||
{
|
||||
if (!error->IsValid())
|
||||
Error::SetString(error, "Save state corruption in internal structures.");
|
||||
|
||||
VMManager::Reset();
|
||||
return false;
|
||||
}
|
||||
|
||||
@@ -1166,6 +1168,7 @@ bool SaveState_UnzipFromDisk(const std::string& filename, Error* error)
|
||||
if (!zff || !SavestateEntries[i]->FreezeIn(zff.get()))
|
||||
{
|
||||
Error::SetString(error, fmt::format("Save state corruption in {}.", SavestateEntries[i]->GetFilename()));
|
||||
VMManager::Reset();
|
||||
return false;
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user