diff --git a/rpcs3/Emu/RSX/Overlays/overlay_message_dialog.cpp b/rpcs3/Emu/RSX/Overlays/overlay_message_dialog.cpp index 5215080247..19f64893d0 100644 --- a/rpcs3/Emu/RSX/Overlays/overlay_message_dialog.cpp +++ b/rpcs3/Emu/RSX/Overlays/overlay_message_dialog.cpp @@ -49,16 +49,12 @@ namespace rsx if (use_custom_background) { - auto icon_path = Emu.GetSfoDir() + "/PIC1.PNG"; - if (!fs::exists(icon_path)) - { - // Fallback path - icon_path = Emu.GetSfoDir() + "/ICON0.PNG"; - } + const auto picture_path = Emu.GetBackgroundPicturePath(); - if (fs::exists(icon_path)) + if (fs::exists(picture_path)) { - background_image = std::make_unique(icon_path.c_str()); + background_image = std::make_unique(picture_path.c_str()); + if (background_image->data) { f32 color = (100 - g_cfg.video.shader_preloading_dialog.darkening_strength) / 100.f; diff --git a/rpcs3/Emu/System.cpp b/rpcs3/Emu/System.cpp index dd5298105d..b110651cf5 100644 --- a/rpcs3/Emu/System.cpp +++ b/rpcs3/Emu/System.cpp @@ -492,6 +492,41 @@ const bool Emulator::SetUsr(const std::string& user) return true; } +const std::string Emulator::GetBackgroundPicturePath() const +{ + std::string path = m_sfo_dir + "/PIC1.PNG"; + + if (!fs::exists(path)) + { + const std::string disc_dir = vfs::get("/dev_bdvd/PS3_GAME"); + + if (disc_dir.empty()) + { + // Fallback to ICON0.PNG + path = m_sfo_dir + "/ICON0.PNG"; + } + else + { + // Fallback to PIC1.PNG in disc dir + path = disc_dir + "/PIC1.PNG"; + + if (!fs::exists(path)) + { + // Fallback to ICON0.PNG in update dir + path = m_sfo_dir + "/ICON0.PNG"; + + if (!fs::exists(path)) + { + // Fallback to ICON0.PNG in disc dir + path = disc_dir + "/ICON0.PNG"; + } + } + } + } + + return path; +} + std::string Emulator::PPUCache() const { const auto _main = fxm::check_unlocked(); diff --git a/rpcs3/Emu/System.h b/rpcs3/Emu/System.h index 4487306eb1..05baca33ad 100644 --- a/rpcs3/Emu/System.h +++ b/rpcs3/Emu/System.h @@ -328,6 +328,8 @@ public: const bool SetUsr(const std::string& user); + const std::string GetBackgroundPicturePath() const; + u64 GetPauseTime() { return m_pause_amend_time;