|
|
|
|
@ -487,8 +487,18 @@ bool HostInterface::ResumeSystemFromState(const char* filename, bool boot_on_fai
|
|
|
|
|
return false;
|
|
|
|
|
|
|
|
|
|
const bool global = m_system->GetRunningCode().empty();
|
|
|
|
|
const std::string path =
|
|
|
|
|
global ? GetGlobalSaveStateFileName(-1) : GetGameSaveStateFileName(m_system->GetRunningCode().c_str(), -1);
|
|
|
|
|
if (m_system->GetRunningCode().empty())
|
|
|
|
|
{
|
|
|
|
|
ReportFormattedError("Cannot resume system with undetectable game code from '%s'.", filename);
|
|
|
|
|
if (!boot_on_failure)
|
|
|
|
|
{
|
|
|
|
|
DestroySystem();
|
|
|
|
|
return true;
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
else
|
|
|
|
|
{
|
|
|
|
|
const std::string path = GetGameSaveStateFileName(m_system->GetRunningCode().c_str(), -1);
|
|
|
|
|
if (FileSystem::FileExists(path.c_str()))
|
|
|
|
|
{
|
|
|
|
|
if (!LoadState(path.c_str()) && !boot_on_failure)
|
|
|
|
|
@ -504,6 +514,7 @@ bool HostInterface::ResumeSystemFromState(const char* filename, bool boot_on_fai
|
|
|
|
|
DestroySystem();
|
|
|
|
|
return false;
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
return true;
|
|
|
|
|
}
|
|
|
|
|
|