System.cpp: Move some Emu.Stop() code to a more strategic placement
This commit is contained in:
@@ -1510,6 +1510,8 @@ void Emulator::Stop(bool restart)
|
|||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
sys_log.notice("Stopping emulator...");
|
||||||
|
|
||||||
named_thread stop_watchdog("Stop Watchdog", [&]()
|
named_thread stop_watchdog("Stop Watchdog", [&]()
|
||||||
{
|
{
|
||||||
for (uint i = 0; thread_ctrl::state() != thread_state::aborting;)
|
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<rsx::thread>())
|
if (auto rsx = g_fxo->try_get<rsx::thread>())
|
||||||
{
|
{
|
||||||
// TODO: notify?
|
// TODO: notify?
|
||||||
@@ -1558,6 +1556,8 @@ void Emulator::Stop(bool restart)
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
GetCallbacks().on_stop();
|
||||||
|
|
||||||
// Join threads
|
// Join threads
|
||||||
for (const auto& type : fxo_t::view_typelist())
|
for (const auto& type : fxo_t::view_typelist())
|
||||||
{
|
{
|
||||||
|
|||||||
Reference in New Issue
Block a user