Fix stop count incremention in Emu.Stop (#9843)

Until emulation is completely stopped, further CallAfter callbacks may be issued with incorrect stop count memorized.
This commit is contained in:
Eladash 2021-02-25 13:37:31 +02:00 committed by GitHub
parent e940632d93
commit c13039396c
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -1873,9 +1873,6 @@ 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>())
@ -1923,6 +1920,9 @@ void Emulator::Stop(bool restart)
sys_log.notice("Atomic wait hashtable stats: [in_use=%u, used=%u, max_collision_weight=%u, total_collisions=%u]", aw_refs, aw_used, aw_colm, aw_colc);
m_stop_ctr++;
m_stop_ctr.notify_all();
if (restart)
{
// Reload with prior configs.