From d78e2dad29b953af7a98d8dbe3df33eb334f493b Mon Sep 17 00:00:00 2001 From: brian218 Date: Wed, 14 Dec 2022 01:39:04 +0800 Subject: [PATCH] sys_game: Made the LV2 Watchdog restarts the game forcefully --- rpcs3/Emu/Cell/lv2/sys_game.cpp | 2 +- rpcs3/Emu/System.cpp | 7 +++++-- rpcs3/Emu/System.h | 2 +- 3 files changed, 7 insertions(+), 4 deletions(-) diff --git a/rpcs3/Emu/Cell/lv2/sys_game.cpp b/rpcs3/Emu/Cell/lv2/sys_game.cpp index c500ca45dc..12dcf70865 100644 --- a/rpcs3/Emu/Cell/lv2/sys_game.cpp +++ b/rpcs3/Emu/Cell/lv2/sys_game.cpp @@ -69,7 +69,7 @@ struct watchdog_t Emu.CallFromMainThread([]() { - Emu.Restart(); + Emu.Restart(false); }); return; diff --git a/rpcs3/Emu/System.cpp b/rpcs3/Emu/System.cpp index 4a9a8eb6a5..0fc2eea173 100644 --- a/rpcs3/Emu/System.cpp +++ b/rpcs3/Emu/System.cpp @@ -2823,13 +2823,16 @@ std::shared_ptr Emulator::Kill(bool allow_autoexit, bool savestat return to_ar; } -game_boot_result Emulator::Restart() +game_boot_result Emulator::Restart(bool graceful) { if (!IsStopped()) { auto save_args = std::make_tuple(argv, envp, data, disc, klic, hdd1, m_config_mode, m_config_mode); - GracefulShutdown(false, false); + if (graceful) + GracefulShutdown(false, false); + else + Kill(false); std::tie(argv, envp, data, disc, klic, hdd1, m_config_mode, m_config_mode) = std::move(save_args); } diff --git a/rpcs3/Emu/System.h b/rpcs3/Emu/System.h index d2b8caa365..7a1b517f60 100644 --- a/rpcs3/Emu/System.h +++ b/rpcs3/Emu/System.h @@ -307,7 +307,7 @@ public: void Resume(); void GracefulShutdown(bool allow_autoexit = true, bool async_op = false, bool savestate = false); std::shared_ptr Kill(bool allow_autoexit = true, bool savestate = false); - game_boot_result Restart(); + game_boot_result Restart(bool graceful = true); bool Quit(bool force_quit); static void CleanUp();