diff --git a/Core/Config.cpp b/Core/Config.cpp index bf813c3bcd..88571f0d88 100644 --- a/Core/Config.cpp +++ b/Core/Config.cpp @@ -1676,6 +1676,8 @@ bool Config::saveGameConfig(const std::string &pGameId, const std::string &title KeyMap::SaveToIni(iniFile); iniFile.Save(fullIniFilePath); + INFO_LOG(Log::Loader, "Game-specific config saved: '%s'", fullIniFilePath.c_str()); + PostSaveCleanup(true); return true; } diff --git a/Core/PSPLoaders.cpp b/Core/PSPLoaders.cpp index f3bce2db6d..aa1e9f6b74 100644 --- a/Core/PSPLoaders.cpp +++ b/Core/PSPLoaders.cpp @@ -168,8 +168,8 @@ bool LoadParamSFOFromPBP(FileLoader *fileLoader) { bool regionCheck = region != 'A' && region != 'E' && region != 'H' && region != 'I' && region != 'J' && region != 'K' && region != 'U' && region != 'X'; bool systemVerCheck = !systemVer.empty() && systemVer[0] >= '5'; if ((formatCheck || regionCheck || discTotalCheck || systemVerCheck) && !discID.empty()) { - // This is NOT a homebrew, so we set the ID (so it won't get set later). - // This is backwards and weird. + // This is NOT a homebrew, so we set the ID. Otherwise it'll later be generated + // on the first access. This is kinda backwards and weird. g_paramSFO.SetValue("DISC_ID", discID, (int)discID.size()); std::string ver = paramSFO.GetValueString("DISC_VERSION"); if (ver.empty()) diff --git a/Core/SaveState.cpp b/Core/SaveState.cpp index 2971b88068..684ad2a17e 100644 --- a/Core/SaveState.cpp +++ b/Core/SaveState.cpp @@ -534,6 +534,7 @@ double g_lastSaveTime = -1.0; std::string discId = g_paramSFO.GetValueString("DISC_ID"); std::string discVer = g_paramSFO.GetValueString("DISC_VERSION"); if (discId.empty()) { + // Should never happen. discId = g_paramSFO.GenerateFakeID(Path()); discVer = "1.00"; } diff --git a/UI/PauseScreen.cpp b/UI/PauseScreen.cpp index 5ac6a6507e..99281afe83 100644 --- a/UI/PauseScreen.cpp +++ b/UI/PauseScreen.cpp @@ -780,7 +780,8 @@ void GamePauseScreen::CallbackDeleteConfig(bool yes) { UI::EventReturn GamePauseScreen::OnCreateConfig(UI::EventParams &e) { std::shared_ptr info = g_gameInfoCache->GetInfo(NULL, gamePath_, GameInfoFlags::PARAM_SFO); if (info->Ready(GameInfoFlags::PARAM_SFO)) { - std::string gameId = g_paramSFO.GetDiscID(); + ParamSFOData paramSFO = info->GetParamSFO(); + std::string gameId = paramSFO.GetDiscID(); // This will end up generating the fake ID properly. g_Config.createGameConfig(gameId); g_Config.changeGameSpecific(gameId, info->GetTitle()); g_Config.saveGameConfig(gameId, info->GetTitle());