mirror of https://github.com/PCSX2/pcsx2.git
SaveState: Reset VM when save state fails to load
This commit is contained in:
parent
c6cd6b5eb3
commit
2fc4d02dd6
|
@ -1151,6 +1151,8 @@ bool SaveState_UnzipFromDisk(const std::string& filename, Error* error)
|
||||||
{
|
{
|
||||||
if (!error->IsValid())
|
if (!error->IsValid())
|
||||||
Error::SetString(error, "Save state corruption in internal structures.");
|
Error::SetString(error, "Save state corruption in internal structures.");
|
||||||
|
|
||||||
|
VMManager::Reset();
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -1166,6 +1168,7 @@ bool SaveState_UnzipFromDisk(const std::string& filename, Error* error)
|
||||||
if (!zff || !SavestateEntries[i]->FreezeIn(zff.get()))
|
if (!zff || !SavestateEntries[i]->FreezeIn(zff.get()))
|
||||||
{
|
{
|
||||||
Error::SetString(error, fmt::format("Save state corruption in {}.", SavestateEntries[i]->GetFilename()));
|
Error::SetString(error, fmt::format("Save state corruption in {}.", SavestateEntries[i]->GetFilename()));
|
||||||
|
VMManager::Reset();
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue