diff --git a/rpcs3/Emu/CMakeLists.txt b/rpcs3/Emu/CMakeLists.txt index 22c9fd1690..c54018ee7f 100644 --- a/rpcs3/Emu/CMakeLists.txt +++ b/rpcs3/Emu/CMakeLists.txt @@ -465,7 +465,7 @@ target_sources(rpcs3_emu PRIVATE RSX/Overlays/overlay_perf_metrics.cpp RSX/Overlays/overlay_progress_bar.cpp RSX/Overlays/overlay_save_dialog.cpp - RSX/Overlays/overlay_shader_compile_notification.cpp + RSX/Overlays/overlay_compile_notification.cpp RSX/Overlays/overlay_user_list_dialog.cpp RSX/Overlays/overlay_utils.cpp RSX/Overlays/overlays.cpp diff --git a/rpcs3/Emu/RSX/GL/GLGSRender.cpp b/rpcs3/Emu/RSX/GL/GLGSRender.cpp index c4d3afbd06..e60a8381cc 100644 --- a/rpcs3/Emu/RSX/GL/GLGSRender.cpp +++ b/rpcs3/Emu/RSX/GL/GLGSRender.cpp @@ -1,5 +1,5 @@ #include "stdafx.h" -#include "../Overlays/overlay_shader_compile_notification.h" +#include "../Overlays/overlay_compile_notification.h" #include "../Overlays/Shaders/shader_loading_dialog_native.h" #include "GLGSRender.h" #include "GLCompute.h" diff --git a/rpcs3/Emu/RSX/Overlays/overlay_compile_notification.cpp b/rpcs3/Emu/RSX/Overlays/overlay_compile_notification.cpp new file mode 100644 index 0000000000..e0d5ea5b0d --- /dev/null +++ b/rpcs3/Emu/RSX/Overlays/overlay_compile_notification.cpp @@ -0,0 +1,45 @@ +#include "stdafx.h" +#include "overlays.h" +#include "overlay_message.h" +#include "overlay_loading_icon.hpp" + +namespace rsx +{ + namespace overlays + { + static std::shared_ptr s_shader_loading_icon24; + static std::shared_ptr s_ppu_loading_icon24; + + void show_shader_compile_notification() + { + if (!s_shader_loading_icon24) + { + // Creating the icon requires FS read, so it is important to cache it + s_shader_loading_icon24 = std::make_shared(); + } + + queue_message( + localized_string_id::RSX_OVERLAYS_COMPILING_SHADERS, + 5'000'000, + {}, + message_pin_location::bottom, + s_shader_loading_icon24); + } + + void show_ppu_compile_notification() + { + if (!s_ppu_loading_icon24) + { + // Creating the icon requires FS read, so it is important to cache it + s_ppu_loading_icon24 = std::make_shared(); + } + + queue_message( + localized_string_id::RSX_OVERLAYS_COMPILING_PPU_MODULES, + 5'000'000, + {}, + message_pin_location::bottom, + s_ppu_loading_icon24); + } + } +} diff --git a/rpcs3/Emu/RSX/Overlays/overlay_shader_compile_notification.h b/rpcs3/Emu/RSX/Overlays/overlay_compile_notification.h similarity index 71% rename from rpcs3/Emu/RSX/Overlays/overlay_shader_compile_notification.h rename to rpcs3/Emu/RSX/Overlays/overlay_compile_notification.h index fc4fae7fcf..412b442171 100644 --- a/rpcs3/Emu/RSX/Overlays/overlay_shader_compile_notification.h +++ b/rpcs3/Emu/RSX/Overlays/overlay_compile_notification.h @@ -5,5 +5,6 @@ namespace rsx namespace overlays { void show_shader_compile_notification(); + void show_ppu_compile_notification(); } } diff --git a/rpcs3/Emu/RSX/Overlays/overlay_message.cpp b/rpcs3/Emu/RSX/Overlays/overlay_message.cpp index 9f67044e51..c3b48b89ce 100644 --- a/rpcs3/Emu/RSX/Overlays/overlay_message.cpp +++ b/rpcs3/Emu/RSX/Overlays/overlay_message.cpp @@ -236,5 +236,16 @@ namespace rsx return false; } + void refresh_message_queue() + { + if (auto manager = g_fxo->try_get()) + { + if (auto msg_overlay = manager->get()) + { + msg_overlay->refresh(); + } + } + } + } // namespace overlays } // namespace rsx diff --git a/rpcs3/Emu/RSX/Overlays/overlay_message.h b/rpcs3/Emu/RSX/Overlays/overlay_message.h index d6201138b6..9acbffc68b 100644 --- a/rpcs3/Emu/RSX/Overlays/overlay_message.h +++ b/rpcs3/Emu/RSX/Overlays/overlay_message.h @@ -78,6 +78,7 @@ namespace rsx } visible = true; + refresh(); } private: @@ -120,5 +121,7 @@ namespace rsx } } + void refresh_message_queue(); + } // namespace overlays } // namespace rsx diff --git a/rpcs3/Emu/RSX/Overlays/overlay_shader_compile_notification.cpp b/rpcs3/Emu/RSX/Overlays/overlay_shader_compile_notification.cpp deleted file mode 100644 index c008c97043..0000000000 --- a/rpcs3/Emu/RSX/Overlays/overlay_shader_compile_notification.cpp +++ /dev/null @@ -1,28 +0,0 @@ -#include "stdafx.h" -#include "overlays.h" -#include "overlay_message.h" -#include "overlay_loading_icon.hpp" - -namespace rsx -{ - namespace overlays - { - static std::shared_ptr s_loading_icon24; - - void show_shader_compile_notification() - { - if (!s_loading_icon24) - { - // Creating the icon requires FS read, so it is important to cache it - s_loading_icon24 = std::make_shared(); - } - - queue_message( - localized_string_id::RSX_OVERLAYS_COMPILING_SHADERS, - 5'000'000, - {}, - message_pin_location::bottom, - s_loading_icon24); - } - } -} diff --git a/rpcs3/Emu/RSX/VK/VKGSRender.cpp b/rpcs3/Emu/RSX/VK/VKGSRender.cpp index 55dc1a2a5c..37bd3327ae 100644 --- a/rpcs3/Emu/RSX/VK/VKGSRender.cpp +++ b/rpcs3/Emu/RSX/VK/VKGSRender.cpp @@ -1,7 +1,5 @@ #include "stdafx.h" -#include "../Overlays/overlay_animated_icon.h" -#include "../Overlays/overlay_manager.h" -#include "../Overlays/overlay_shader_compile_notification.h" +#include "../Overlays/overlay_compile_notification.h" #include "../Overlays/Shaders/shader_loading_dialog_native.h" #include "VKAsyncScheduler.h" diff --git a/rpcs3/Emu/localized_string_id.h b/rpcs3/Emu/localized_string_id.h index 0caf3b0928..fb81f0642f 100644 --- a/rpcs3/Emu/localized_string_id.h +++ b/rpcs3/Emu/localized_string_id.h @@ -9,6 +9,7 @@ enum class localized_string_id RSX_OVERLAYS_TROPHY_GOLD, RSX_OVERLAYS_TROPHY_PLATINUM, RSX_OVERLAYS_COMPILING_SHADERS, + RSX_OVERLAYS_COMPILING_PPU_MODULES, RSX_OVERLAYS_MSG_DIALOG_YES, RSX_OVERLAYS_MSG_DIALOG_NO, RSX_OVERLAYS_MSG_DIALOG_CANCEL, diff --git a/rpcs3/Emu/system_progress.cpp b/rpcs3/Emu/system_progress.cpp index 50347fcbd0..aacc5229a2 100644 --- a/rpcs3/Emu/system_progress.cpp +++ b/rpcs3/Emu/system_progress.cpp @@ -4,6 +4,8 @@ #include "Emu/RSX/RSXThread.h" #include "Emu/RSX/Overlays/overlay_manager.h" #include "Emu/RSX/Overlays/overlay_message_dialog.h" +#include "Emu/RSX/Overlays/overlay_message.h" +#include "Emu/RSX/Overlays/overlay_compile_notification.h" #include "Emu/System.h" LOG_CHANNEL(sys_log, "SYS"); @@ -141,7 +143,8 @@ void progress_dialog_server::operator()() if (skip_this_one) { - // Do nothing + // Show a message instead + rsx::overlays::show_ppu_compile_notification(); thread_ctrl::wait_for(10000); continue; } @@ -177,6 +180,12 @@ void progress_dialog_server::operator()() } } + if (skip_this_one) + { + // Make sure to update any pending messages. PPU compilation may freeze the image. + rsx::overlays::refresh_message_queue(); + } + thread_ctrl::wait_for(10000); } diff --git a/rpcs3/emucore.vcxproj b/rpcs3/emucore.vcxproj index d88f36f6f2..290e710064 100644 --- a/rpcs3/emucore.vcxproj +++ b/rpcs3/emucore.vcxproj @@ -98,7 +98,7 @@ - + @@ -575,7 +575,7 @@ - + diff --git a/rpcs3/emucore.vcxproj.filters b/rpcs3/emucore.vcxproj.filters index 2dd35f162f..32d9305547 100644 --- a/rpcs3/emucore.vcxproj.filters +++ b/rpcs3/emucore.vcxproj.filters @@ -1132,7 +1132,7 @@ Emu\GPU\RSX\Overlays - + Emu\GPU\RSX\Overlays @@ -1959,7 +1959,7 @@ Emu\GPU\RSX\Overlays - + Emu\GPU\RSX\Overlays diff --git a/rpcs3/rpcs3qt/localized_emu.h b/rpcs3/rpcs3qt/localized_emu.h index 86818f90b1..d34603574e 100644 --- a/rpcs3/rpcs3qt/localized_emu.h +++ b/rpcs3/rpcs3qt/localized_emu.h @@ -39,6 +39,7 @@ private: case localized_string_id::RSX_OVERLAYS_TROPHY_GOLD: return tr("You have earned a gold trophy.\n%0", "Trophy text").arg(std::forward(args)...); case localized_string_id::RSX_OVERLAYS_TROPHY_PLATINUM: return tr("You have earned a platinum trophy.\n%0", "Trophy text").arg(std::forward(args)...); case localized_string_id::RSX_OVERLAYS_COMPILING_SHADERS: return tr("Compiling shaders"); + case localized_string_id::RSX_OVERLAYS_COMPILING_PPU_MODULES: return tr("Compiling PPU Modules"); case localized_string_id::RSX_OVERLAYS_MSG_DIALOG_YES: return tr("Yes", "Message Dialog"); case localized_string_id::RSX_OVERLAYS_MSG_DIALOG_NO: return tr("No", "Message Dialog"); case localized_string_id::RSX_OVERLAYS_MSG_DIALOG_CANCEL: return tr("Back", "Message Dialog");