From e0a98ea54cf5cbdc634c6edbc84c146fd7a2a0d2 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Henrik=20Rydg=C3=A5rd?= Date: Sun, 1 Jun 2025 11:47:07 +0200 Subject: [PATCH] Improve the "No game loaded" RA popup --- Core/ELF/ParamSFO.h | 2 +- Core/RetroAchievements.cpp | 13 ++++++++++++- 2 files changed, 13 insertions(+), 2 deletions(-) diff --git a/Core/ELF/ParamSFO.h b/Core/ELF/ParamSFO.h index 1d7636635d..948723b71f 100644 --- a/Core/ELF/ParamSFO.h +++ b/Core/ELF/ParamSFO.h @@ -33,7 +33,7 @@ public: void SetValue(const std::string &key, const u8 *value, unsigned int size, int max_size); int GetValueInt(std::string_view key) const; - std::string GetValueString(std::string_view key) const; + std::string GetValueString(std::string_view key) const; // Common keys: "TITLE", "DISC_VERSION" bool HasKey(std::string_view key) const; const u8 *GetValueData(std::string_view key, unsigned int *size) const; diff --git a/Core/RetroAchievements.cpp b/Core/RetroAchievements.cpp index d7a1083a25..58694fb1a9 100644 --- a/Core/RetroAchievements.cpp +++ b/Core/RetroAchievements.cpp @@ -959,9 +959,20 @@ void identify_and_load_callback(int result, const char *error_message, rc_client break; } case RC_NO_GAME_LOADED: + { + GameRegion region = DetectGameRegionFromID(g_paramSFO.GetDiscID()); + auto ga = GetI18NCategory(I18NCat::GAME); + std::string_view regionStr = ga->T(GameRegionToString(region)); + std::string title(g_paramSFO.GetValueString("TITLE")); + if (region != GameRegion::OTHER) { + title += " ("; + title += regionStr; + title += ")"; + } // The current game does not support achievements. - g_OSD.Show(OSDType::MESSAGE_INFO, ac->T("RetroAchievements are not available for this game"), "", g_RAImageID, 3.0f); + g_OSD.Show(OSDType::MESSAGE_INFO, title, ac->T("RetroAchievements are not available for this game"), g_RAImageID, 3.0f); break; + } case RC_NO_RESPONSE: // We lost the internet connection at some point and can't report achievements. ShowNotLoggedInMessage();