diff --git a/rpcs3/Emu/Cell/PPUThread.cpp b/rpcs3/Emu/Cell/PPUThread.cpp index a5c528b0c5..b6073de8ba 100644 --- a/rpcs3/Emu/Cell/PPUThread.cpp +++ b/rpcs3/Emu/Cell/PPUThread.cpp @@ -1535,7 +1535,7 @@ void ppu_thread::cpu_task() // Wait until the progress dialog is closed. // We don't want to open a cell dialog while a native progress dialog is still open. thread_ctrl::wait_on(g_progr_ptotal, 0); - g_fxo->get().skip_the_progress_dialog = true; + g_fxo->get().show_overlay_message_only = true; // Sadly we can't postpone initializing guest time because we need to run PPU threads // (the farther it's postponed, the less accuracy of guest time has been lost) diff --git a/rpcs3/Emu/System.h b/rpcs3/Emu/System.h index 98355b3a0e..a06ed67653 100644 --- a/rpcs3/Emu/System.h +++ b/rpcs3/Emu/System.h @@ -15,14 +15,6 @@ void init_fxo_for_exec(utils::serial*, bool); -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; diff --git a/rpcs3/Emu/system_progress.cpp b/rpcs3/Emu/system_progress.cpp index aacc5229a2..2f291af363 100644 --- a/rpcs3/Emu/system_progress.cpp +++ b/rpcs3/Emu/system_progress.cpp @@ -61,7 +61,7 @@ void progress_dialog_server::operator()() g_system_progress_canceled = false; // Initialize message dialog - bool skip_this_one = false; // Workaround: do not open a progress dialog if there is already a cell message dialog open. + bool show_overlay_message = false; // Only show an overlay message after initial loading is done. std::shared_ptr dlg; if (const auto renderer = rsx::get_current_renderer()) @@ -71,9 +71,9 @@ void progress_dialog_server::operator()() renderer->is_initialized.wait(false, atomic_wait_timeout(5 * 1000000000ull)); auto manager = g_fxo->try_get(); - skip_this_one = !renderer->is_initialized || g_fxo->get().skip_the_progress_dialog || (manager && manager->get()); + show_overlay_message = show_overlay_message_only; - if (manager && !skip_this_one) + if (manager && !show_overlay_message) { MsgDialogType type{}; type.se_mute_on = true; @@ -88,7 +88,7 @@ void progress_dialog_server::operator()() } } - if (!skip_this_one && !native_dlg && (dlg = Emu.GetCallbacks().get_msg_dialog())) + if (!show_overlay_message && !native_dlg && (dlg = Emu.GetCallbacks().get_msg_dialog())) { dlg->type.se_normal = true; dlg->type.bg_invisible = true; @@ -141,7 +141,7 @@ void progress_dialog_server::operator()() break; } - if (skip_this_one) + if (show_overlay_message) { // Show a message instead rsx::overlays::show_ppu_compile_notification(); @@ -180,7 +180,7 @@ void progress_dialog_server::operator()() } } - if (skip_this_one) + if (show_overlay_message) { // Make sure to update any pending messages. PPU compilation may freeze the image. rsx::overlays::refresh_message_queue(); @@ -194,7 +194,7 @@ void progress_dialog_server::operator()() break; } - if (skip_this_one) + if (show_overlay_message) { // Do nothing } diff --git a/rpcs3/Emu/system_progress.hpp b/rpcs3/Emu/system_progress.hpp index 2cb6d94fdd..793318569a 100644 --- a/rpcs3/Emu/system_progress.hpp +++ b/rpcs3/Emu/system_progress.hpp @@ -39,4 +39,7 @@ struct progress_dialog_server ~progress_dialog_server(); static constexpr auto thread_name = "Progress Dialog Server"sv; + + // We don't want to show the native dialog during gameplay. + atomic_t show_overlay_message_only = false; };