mirror of
https://github.com/RPCSX/rpcsx.git
synced 2026-04-05 06:26:49 +00:00
Add savestate buttons to home menu
This commit is contained in:
parent
a6313fa46c
commit
79d09d02ed
10 changed files with 142 additions and 10 deletions
|
|
@ -174,7 +174,7 @@ std::vector<std::pair<u16, u16>> read_used_savestate_versions()
|
|||
return used_serial;
|
||||
}
|
||||
|
||||
bool boot_last_savestate()
|
||||
bool boot_last_savestate(bool testing)
|
||||
{
|
||||
if (!g_cfg.savestate.suspend_emu && !Emu.GetTitleID().empty() && (Emu.IsRunning() || Emu.GetStatus() == system_state::paused))
|
||||
{
|
||||
|
|
@ -203,7 +203,15 @@ bool boot_last_savestate()
|
|||
}
|
||||
}
|
||||
|
||||
if (fs::is_file(savestate_path))
|
||||
const bool result = fs::is_file(savestate_path);
|
||||
|
||||
if (testing)
|
||||
{
|
||||
sys_log.trace("boot_last_savestate(true) returned %s.", result);
|
||||
return result;
|
||||
}
|
||||
|
||||
if (result)
|
||||
{
|
||||
sys_log.success("Booting the most recent savestate \'%s\' using the Reload shortcut.", savestate_path);
|
||||
Emu.GracefulShutdown(false);
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue