fixup! Misc: Necessary emucore changes for Android
This commit is contained in:
parent
523297c60e
commit
6bf0ad789e
|
@ -1000,13 +1000,26 @@ bool System::SaveState(const char* filename, bool backup_existing_save)
|
|||
}
|
||||
else
|
||||
{
|
||||
Host::AddFormattedOSDMessage(5.0f, Host::TranslateString("OSDMessage", "State saved to '%s'."), filename);
|
||||
const std::string display_name(FileSystem::GetDisplayNameFromPath(filename));
|
||||
Host::AddIconOSDMessage("save_state", ICON_FA_SAVE,
|
||||
fmt::format(Host::TranslateString("OSDMessage", "State saved to '{}'.").GetCharArray(),
|
||||
Path::GetFileName(display_name)),
|
||||
5.0f);
|
||||
stream->Commit();
|
||||
}
|
||||
|
||||
return result;
|
||||
}
|
||||
|
||||
bool System::SaveResumeState()
|
||||
{
|
||||
if (s_running_game_code.empty())
|
||||
return false;
|
||||
|
||||
const std::string path(GetGameSaveStateFileName(s_running_game_code, -1));
|
||||
return SaveState(path.c_str(), false);
|
||||
}
|
||||
|
||||
bool System::BootSystem(SystemBootParameters parameters)
|
||||
{
|
||||
if (!parameters.save_state.empty())
|
||||
|
@ -3522,11 +3535,8 @@ void System::ShutdownSystem(bool save_resume_state)
|
|||
if (!IsValid())
|
||||
return;
|
||||
|
||||
if (save_resume_state && !s_running_game_code.empty())
|
||||
{
|
||||
std::string path(GetGameSaveStateFileName(s_running_game_code, -1));
|
||||
SaveState(path.c_str(), false);
|
||||
}
|
||||
if (save_resume_state)
|
||||
SaveResumeState();
|
||||
|
||||
DestroySystem();
|
||||
}
|
||||
|
|
|
@ -199,6 +199,7 @@ void ResetSystem();
|
|||
/// Loads state from the specified filename.
|
||||
bool LoadState(const char* filename);
|
||||
bool SaveState(const char* filename, bool backup_existing_save);
|
||||
bool SaveResumeState();
|
||||
|
||||
/// Runs the VM until the CPU execution is canceled.
|
||||
void Execute();
|
||||
|
|
Loading…
Reference in New Issue