diff --git a/rpcs3/Emu/Cell/PPUThread.cpp b/rpcs3/Emu/Cell/PPUThread.cpp index b339116c97..a052453071 100644 --- a/rpcs3/Emu/Cell/PPUThread.cpp +++ b/rpcs3/Emu/Cell/PPUThread.cpp @@ -1823,6 +1823,11 @@ void ppu_thread::cpu_task() // We don't want to open a cell dialog while a native progress dialog is still open. while (u32 v = g_progr_ptotal) { + if (Emu.IsStopped()) + { + return; + } + g_progr_ptotal.wait(v); } diff --git a/rpcs3/Emu/Cell/SPURecompiler.cpp b/rpcs3/Emu/Cell/SPURecompiler.cpp index 8019a7f24e..49ff59a856 100644 --- a/rpcs3/Emu/Cell/SPURecompiler.cpp +++ b/rpcs3/Emu/Cell/SPURecompiler.cpp @@ -649,6 +649,11 @@ void spu_cache::initialize() // Initialize progress dialog (wait for previous progress done) while (u32 v = g_progr_ptotal) { + if (Emu.IsStopped()) + { + break; + } + g_progr_ptotal.wait(v); } diff --git a/rpcs3/Emu/system_progress.cpp b/rpcs3/Emu/system_progress.cpp index 6ce68a668e..3869262349 100644 --- a/rpcs3/Emu/system_progress.cpp +++ b/rpcs3/Emu/system_progress.cpp @@ -226,6 +226,11 @@ void progress_dialog_server::operator()() native_dlg->set_text("Stopping. Please wait..."); native_dlg->refresh(); } + + if (g_progr_ptotal.exchange(0)) + { + g_progr_ptotal.notify_all(); + } } progress_dialog_server::~progress_dialog_server()