diff --git a/rpcs3/Emu/Cell/PPUThread.cpp b/rpcs3/Emu/Cell/PPUThread.cpp index 2fb94610da..582c38274d 100644 --- a/rpcs3/Emu/Cell/PPUThread.cpp +++ b/rpcs3/Emu/Cell/PPUThread.cpp @@ -964,6 +964,12 @@ void ppu_thread::cpu_task() } ppu_initialize(), spu_cache::initialize(); + + // Wait until the progress dialog is closed. + // We don't want to open a cell dialog while a native progress dialog is still open. + g_progr_ptotal.wait(0); + g_fxo->get().skip_the_progress_dialog = true; + break; } case ppu_cmd::sleep: diff --git a/rpcs3/Emu/Cell/SPURecompiler.cpp b/rpcs3/Emu/Cell/SPURecompiler.cpp index 135db1a199..2950dbdc25 100644 --- a/rpcs3/Emu/Cell/SPURecompiler.cpp +++ b/rpcs3/Emu/Cell/SPURecompiler.cpp @@ -420,10 +420,7 @@ void spu_cache::initialize() if (g_cfg.core.spu_decoder == spu_decoder_type::asmjit || g_cfg.core.spu_decoder == spu_decoder_type::llvm) { // Initialize progress dialog (wait for previous progress done) - while (g_progr_ptotal) - { - g_progr_ptotal.wait(0); - } + g_progr_ptotal.wait(0); g_progr_ptotal += ::size32(func_list); progr.emplace("Building SPU cache..."); diff --git a/rpcs3/Emu/System.cpp b/rpcs3/Emu/System.cpp index 6b5f39e99f..de207790c6 100644 --- a/rpcs3/Emu/System.cpp +++ b/rpcs3/Emu/System.cpp @@ -377,7 +377,7 @@ namespace renderer && renderer->is_inited) { auto manager = g_fxo->try_get(); - skip_this_one = manager && manager->get(); + skip_this_one = g_fxo->get().skip_the_progress_dialog || (manager && manager->get()); if (manager && !skip_this_one) { diff --git a/rpcs3/Emu/System.h b/rpcs3/Emu/System.h index 1103a599c5..f171d08a16 100644 --- a/rpcs3/Emu/System.h +++ b/rpcs3/Emu/System.h @@ -10,6 +10,14 @@ #include "Emu/Cell/timers.hpp" +struct progress_dialog_workaround +{ + // WORKAROUND: + // We don't want to show the native dialog during gameplay. + // This can currently interfere with cell dialogs. + atomic_t skip_the_progress_dialog = false; +}; + enum class localized_string_id; enum class video_renderer;