mirror of
https://github.com/RPCS3/rpcs3.git
synced 2025-07-13 02:08:49 +12:00
Savestates: Make Ctrl+R work when not ingame
Restore old behavior of Ctrl+R making it restart emulation when stoppped.
This commit is contained in:
parent
9b5cc7cda7
commit
f34773ed73
2 changed files with 18 additions and 8 deletions
|
@ -2536,6 +2536,12 @@ std::shared_ptr<utils::serial> Emulator::Kill(bool allow_autoexit, bool savestat
|
|||
}
|
||||
|
||||
sys_log.success("Saved savestate! path='%s'", path);
|
||||
|
||||
if (!g_cfg.savestate.suspend_emu)
|
||||
{
|
||||
// Allow to reboot from GUI
|
||||
m_path = path;
|
||||
}
|
||||
}
|
||||
|
||||
ar.set_reading_state();
|
||||
|
@ -2567,17 +2573,15 @@ std::shared_ptr<utils::serial> Emulator::Kill(bool allow_autoexit, bool savestat
|
|||
|
||||
game_boot_result Emulator::Restart()
|
||||
{
|
||||
if (m_state == system_state::stopped)
|
||||
if (!IsStopped())
|
||||
{
|
||||
return game_boot_result::generic_error;
|
||||
auto save_args = std::make_tuple(argv, envp, data, disc, klic, hdd1, m_config_mode, m_config_mode);
|
||||
|
||||
GracefulShutdown(false, false);
|
||||
|
||||
std::tie(argv, envp, data, disc, klic, hdd1, m_config_mode, m_config_mode) = std::move(save_args);
|
||||
}
|
||||
|
||||
auto save_args = std::make_tuple(argv, envp, data, disc, klic, hdd1, m_config_mode, m_config_mode);
|
||||
|
||||
GracefulShutdown(false, false);
|
||||
|
||||
std::tie(argv, envp, data, disc, klic, hdd1, m_config_mode, m_config_mode) = std::move(save_args);
|
||||
|
||||
// Reload with prior configs.
|
||||
if (const auto error = Load(m_title_id); error != game_boot_result::no_errors)
|
||||
{
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue