From a79fbbc606769c1520265bd1604c3f2dc4a3a77e Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Henrik=20Rydg=C3=A5rd?= Date: Thu, 22 Oct 2026 08:53:01 +0200 Subject: [PATCH] GameScreen, CwCheat: Use the game ID from the info cache Both worked out the ID themselves with a copy of the homebrew rule that lacks the PS1 exception added to GameInfoCache in 7ced173c17. For a PS1 EBOOT in PSP/GAME, Game Settings then edited the global config even though Create Game Config had made a per-game one under the real ID. Co-Authored-By: Claude Opus 5.5 (1M context) --- UI/CwCheatScreen.cpp | 7 ++----- UI/GameScreen.cpp | 6 ++---- 2 files changed, 4 insertions(+), 9 deletions(-) diff --git a/UI/CwCheatScreen.cpp b/UI/CwCheatScreen.cpp index 3d0d1c5e21..e6cd45a3b6 100644 --- a/UI/CwCheatScreen.cpp +++ b/UI/CwCheatScreen.cpp @@ -160,14 +160,11 @@ bool CwCheatScreen::WantsTextInput() const { bool CwCheatScreen::TryLoadCheatInfo() { std::shared_ptr info = g_gameInfoCache->GetInfo(nullptr, gamePath_, GameInfoFlags::PARAM_SFO); - std::string gameID; if (!info->Ready(GameInfoFlags::PARAM_SFO)) { return false; } - gameID = info->GetParamSFO().GetValueString("DISC_ID"); - if ((info->id.empty() || !info->disc_total) && gamePath_.FilePathContainsNoCase("PSP/GAME/")) { - gameID = g_paramSFO.GenerateFakeID(gamePath_); - } + // The cache has already replaced the ID of homebrew with a generated one. + const std::string &gameID = info->id; if (!engine_ || gameID != gameID_) { gameID_ = gameID; diff --git a/UI/GameScreen.cpp b/UI/GameScreen.cpp index 0468fd7b64..65b7817e56 100644 --- a/UI/GameScreen.cpp +++ b/UI/GameScreen.cpp @@ -799,10 +799,8 @@ void GameScreen::OnDeleteConfig(UI::EventParams &e) { void GameScreen::OnGameSettings(UI::EventParams &e) { std::shared_ptr info_ = g_gameInfoCache->GetInfo(NULL, gamePath_, GameInfoFlags::PARAM_SFO); if (info_ && info_->Ready(GameInfoFlags::PARAM_SFO)) { - std::string discID = info_->GetParamSFO().GetValueString("DISC_ID"); - if ((discID.empty() || !info_->disc_total) && gamePath_.FilePathContainsNoCase("PSP/GAME/")) - discID = g_paramSFO.GenerateFakeID(gamePath_); - screenManager()->push(new GameSettingsScreen(gamePath_, discID, true)); + // The cache has already replaced the ID of homebrew with a generated one. + screenManager()->push(new GameSettingsScreen(gamePath_, info_->id, true)); } }