From 4a4f318e248dbc04034f6098e80ac1f359862faf Mon Sep 17 00:00:00 2001 From: Eladash Date: Tue, 8 Jun 2021 19:08:23 +0300 Subject: [PATCH] System.cpp: Move some Emu.Stop() code to a more strategic placement --- rpcs3/Emu/System.cpp | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/rpcs3/Emu/System.cpp b/rpcs3/Emu/System.cpp index d9f01de9a0..209795156f 100644 --- a/rpcs3/Emu/System.cpp +++ b/rpcs3/Emu/System.cpp @@ -1510,6 +1510,8 @@ void Emulator::Stop(bool restart) return; } + sys_log.notice("Stopping emulator..."); + named_thread stop_watchdog("Stop Watchdog", [&]() { for (uint i = 0; thread_ctrl::state() != thread_state::aborting;) @@ -1532,10 +1534,6 @@ void Emulator::Stop(bool restart) } }); - sys_log.notice("Stopping emulator..."); - - GetCallbacks().on_stop(); - if (auto rsx = g_fxo->try_get()) { // TODO: notify? @@ -1558,6 +1556,8 @@ void Emulator::Stop(bool restart) } } + GetCallbacks().on_stop(); + // Join threads for (const auto& type : fxo_t::view_typelist()) {