Fix Emulation::CallAfter

Most CallAfter usages were extremely wrong when ordered after Emu.Stop(). could result in anywhere from emulation stopping hangs to even segfaults.
track_emu_state = true is now the default, I haven't found cases which need need it disabled.
This commit is contained in:
Eladash 2021-02-13 18:05:31 +02:00 committed by Ivan
parent 68a878264c
commit 112b7f6571
5 changed files with 40 additions and 23 deletions

View file

@ -1873,6 +1873,9 @@ void Emulator::Stop(bool restart)
sys_log.notice("Stopping emulator...");
m_stop_ctr++;
m_stop_ctr.notify_all();
GetCallbacks().on_stop();
if (auto rsx = g_fxo->get<rsx::thread>())