From 1081497cad9c70c5b66552e20bbc00657a05f0e5 Mon Sep 17 00:00:00 2001 From: JosJuice Date: Sat, 29 Oct 2016 14:42:43 +0200 Subject: [PATCH] DiscIO/SConfig: Rename GetUniqueID to GetGameID We call this "game ID" everywhere else, and it's not actually completely unique. --- Source/Android/jni/MainAndroid.cpp | 2 +- Source/Core/Core/Analytics.cpp | 4 ++-- Source/Core/Core/Boot/Boot.cpp | 8 +++---- Source/Core/Core/BootManager.cpp | 2 +- Source/Core/Core/ConfigManager.cpp | 24 +++++++++---------- Source/Core/Core/ConfigManager.h | 4 ++-- Source/Core/Core/Core.cpp | 4 ++-- Source/Core/Core/HW/EXI_DeviceMemoryCard.cpp | 10 ++++---- Source/Core/Core/IPC_HLE/WII_Socket.cpp | 4 ++-- Source/Core/Core/Movie.cpp | 6 ++--- Source/Core/Core/State.cpp | 6 ++--- Source/Core/DiscIO/Volume.h | 2 +- Source/Core/DiscIO/VolumeDirectory.cpp | 6 ++--- Source/Core/DiscIO/VolumeDirectory.h | 4 ++-- Source/Core/DiscIO/VolumeGC.cpp | 2 +- Source/Core/DiscIO/VolumeGC.h | 2 +- Source/Core/DiscIO/VolumeWad.cpp | 2 +- Source/Core/DiscIO/VolumeWad.h | 2 +- Source/Core/DiscIO/VolumeWiiCrypted.cpp | 2 +- Source/Core/DiscIO/VolumeWiiCrypted.h | 2 +- Source/Core/DolphinQt2/Config/InfoWidget.cpp | 2 +- .../DolphinQt2/Config/PropertiesDialog.cpp | 2 +- Source/Core/DolphinQt2/GameList/GameFile.cpp | 4 ++-- Source/Core/DolphinQt2/GameList/GameFile.h | 4 ++-- Source/Core/DolphinQt2/GameList/GameList.cpp | 2 +- .../DolphinQt2/GameList/GameListModel.cpp | 2 +- Source/Core/DolphinWX/Cheats/CheatsWindow.cpp | 2 +- .../DolphinWX/Debugger/BreakpointWindow.cpp | 7 +++--- .../Core/DolphinWX/Debugger/DebuggerPanel.cpp | 2 +- .../Core/DolphinWX/Debugger/WatchWindow.cpp | 7 +++--- Source/Core/DolphinWX/Frame.cpp | 2 +- Source/Core/DolphinWX/GameListCtrl.cpp | 12 +++++----- Source/Core/DolphinWX/ISOFile.cpp | 22 ++++++++--------- Source/Core/DolphinWX/ISOFile.h | 4 ++-- Source/Core/DolphinWX/ISOProperties.cpp | 10 ++++---- Source/Core/InputCommon/InputConfig.cpp | 2 +- .../VideoBackends/D3D/GeometryShaderCache.cpp | 2 +- .../VideoBackends/D3D/PixelShaderCache.cpp | 2 +- .../VideoBackends/D3D/VertexShaderCache.cpp | 2 +- Source/Core/VideoBackends/D3D12/D3DState.cpp | 2 +- .../Core/VideoBackends/D3D12/ShaderCache.cpp | 8 +++---- .../VideoBackends/OGL/ProgramShaderCache.cpp | 2 +- .../Core/VideoBackends/Vulkan/ObjectCache.cpp | 2 +- Source/Core/VideoCommon/HiresTextures.cpp | 4 ++-- Source/Core/VideoCommon/TextureCacheBase.cpp | 2 +- 45 files changed, 104 insertions(+), 106 deletions(-) diff --git a/Source/Android/jni/MainAndroid.cpp b/Source/Android/jni/MainAndroid.cpp index 5e12fffa57..8b8676e633 100644 --- a/Source/Android/jni/MainAndroid.cpp +++ b/Source/Android/jni/MainAndroid.cpp @@ -347,7 +347,7 @@ static std::string GetGameId(std::string filename) if (volume == nullptr) return std::string(); - std::string id = volume->GetUniqueID(); + std::string id = volume->GetGameID(); __android_log_print(ANDROID_LOG_INFO, DOLPHIN_TAG, "Game ID: %s", id.c_str()); return id; } diff --git a/Source/Core/Core/Analytics.cpp b/Source/Core/Core/Analytics.cpp index b3cddedf16..65d298af0d 100644 --- a/Source/Core/Core/Analytics.cpp +++ b/Source/Core/Core/Analytics.cpp @@ -183,10 +183,10 @@ void DolphinAnalytics::MakePerGameBuilder() Common::AnalyticsReportBuilder builder(m_base_builder); // Gameid. - builder.AddData("gameid", SConfig::GetInstance().GetUniqueID()); + builder.AddData("gameid", SConfig::GetInstance().GetGameID()); // Unique id bound to the gameid. - builder.AddData("id", MakeUniqueId(SConfig::GetInstance().GetUniqueID())); + builder.AddData("id", MakeUniqueId(SConfig::GetInstance().GetGameID())); // Configuration. builder.AddData("cfg-dsp-hle", SConfig::GetInstance().bDSPHLE); diff --git a/Source/Core/Core/Boot/Boot.cpp b/Source/Core/Core/Boot/Boot.cpp index 5b719f0bcb..59b6eee70c 100644 --- a/Source/Core/Core/Boot/Boot.cpp +++ b/Source/Core/Core/Boot/Boot.cpp @@ -121,7 +121,7 @@ bool CBoot::FindMapFile(std::string* existing_map_file, std::string* writable_ma break; default: - title_id_str = _StartupPara.GetUniqueID(); + title_id_str = _StartupPara.GetGameID(); break; } @@ -274,9 +274,9 @@ bool CBoot::BootUp() PanicAlertT("Warning - starting ISO in wrong console mode!"); } - std::string unique_id = DVDInterface::GetVolume().GetUniqueID(); - if (unique_id.size() >= 4) - VideoInterface::SetRegionReg(unique_id.at(3)); + std::string game_id = DVDInterface::GetVolume().GetGameID(); + if (game_id.size() >= 4) + VideoInterface::SetRegionReg(game_id.at(3)); std::vector tmd_buffer = pVolume.GetTMD(); if (!tmd_buffer.empty()) diff --git a/Source/Core/Core/BootManager.cpp b/Source/Core/Core/BootManager.cpp index 33c00ec892..16b4e03d16 100644 --- a/Source/Core/Core/BootManager.cpp +++ b/Source/Core/Core/BootManager.cpp @@ -387,7 +387,7 @@ void Stop() void RestoreConfig() { SConfig::GetInstance().LoadSettingsFromSysconf(); - SConfig::GetInstance().m_strUniqueID = "00000000"; + SConfig::GetInstance().m_strGameID = "00000000"; config_cache.RestoreConfig(&SConfig::GetInstance()); } diff --git a/Source/Core/Core/ConfigManager.cpp b/Source/Core/Core/ConfigManager.cpp index d1ee866190..2a594c2c25 100644 --- a/Source/Core/Core/ConfigManager.cpp +++ b/Source/Core/Core/ConfigManager.cpp @@ -788,7 +788,7 @@ void SConfig::LoadDefaults() bJITBranchOff = false; m_strName = "NONE"; - m_strUniqueID = "00000000"; + m_strGameID = "00000000"; m_revision = 0; } @@ -861,7 +861,7 @@ bool SConfig::AutoSetup(EBootBS2 _BootBS2) return false; } m_strName = pVolume->GetInternalName(); - m_strUniqueID = pVolume->GetUniqueID(); + m_strGameID = pVolume->GetGameID(); m_revision = pVolume->GetRevision(); // Check if we have a Wii disc @@ -939,28 +939,28 @@ bool SConfig::AutoSetup(EBootBS2 _BootBS2) if (pVolume) { m_strName = pVolume->GetInternalName(); - m_strUniqueID = pVolume->GetUniqueID(); + m_strGameID = pVolume->GetGameID(); } else { // null pVolume means that we are loading from nand folder (Most Likely Wii Menu) // if this is the second boot we would be using the Name and id of the last title m_strName.clear(); - m_strUniqueID.clear(); + m_strGameID.clear(); } - // Use the TitleIDhex for name and/or unique ID if launching from nand folder - // or if it is not ascii characters (specifically sysmenu could potentially apply to other - // things) + // Use the TitleIDhex for name and/or game ID if launching + // from nand folder or if it is not ascii characters + // (specifically sysmenu could potentially apply to other things) std::string titleidstr = StringFromFormat("%016" PRIx64, ContentLoader.GetTitleID()); if (m_strName.empty()) { m_strName = titleidstr; } - if (m_strUniqueID.empty()) + if (m_strGameID.empty()) { - m_strUniqueID = titleidstr; + m_strGameID = titleidstr; } } else @@ -1085,17 +1085,17 @@ DiscIO::Language SConfig::GetCurrentLanguage(bool wii) const IniFile SConfig::LoadDefaultGameIni() const { - return LoadDefaultGameIni(GetUniqueID(), m_revision); + return LoadDefaultGameIni(GetGameID(), m_revision); } IniFile SConfig::LoadLocalGameIni() const { - return LoadLocalGameIni(GetUniqueID(), m_revision); + return LoadLocalGameIni(GetGameID(), m_revision); } IniFile SConfig::LoadGameIni() const { - return LoadGameIni(GetUniqueID(), m_revision); + return LoadGameIni(GetGameID(), m_revision); } IniFile SConfig::LoadDefaultGameIni(const std::string& id, u16 revision) diff --git a/Source/Core/Core/ConfigManager.h b/Source/Core/Core/ConfigManager.h index 40c3ea95fb..0de73761f5 100644 --- a/Source/Core/Core/ConfigManager.h +++ b/Source/Core/Core/ConfigManager.h @@ -198,7 +198,7 @@ struct SConfig : NonCopyable std::string m_strDefaultISO; std::string m_strDVDRoot; std::string m_strApploader; - std::string m_strUniqueID; + std::string m_strGameID; std::string m_strName; std::string m_strWiiSDCardPath; u16 m_revision; @@ -207,7 +207,7 @@ struct SConfig : NonCopyable void LoadDefaults(); bool AutoSetup(EBootBS2 _BootBS2); - const std::string& GetUniqueID() const { return m_strUniqueID; } + const std::string& GetGameID() const { return m_strGameID; } void CheckMemcardPath(std::string& memcardPath, const std::string& gameRegion, bool isSlotA); DiscIO::Language GetCurrentLanguage(bool wii) const; diff --git a/Source/Core/Core/Core.cpp b/Source/Core/Core/Core.cpp index 8e0d691afc..08c48f3a04 100644 --- a/Source/Core/Core/Core.cpp +++ b/Source/Core/Core/Core.cpp @@ -731,7 +731,7 @@ EState GetState() static std::string GenerateScreenshotFolderPath() { - const std::string& gameId = SConfig::GetInstance().GetUniqueID(); + const std::string& gameId = SConfig::GetInstance().GetGameID(); std::string path = File::GetUserPath(D_SCREENSHOTS_IDX) + gameId + DIR_SEP_CHR; if (!File::CreateFullPath(path)) @@ -748,7 +748,7 @@ static std::string GenerateScreenshotName() std::string path = GenerateScreenshotFolderPath(); // append gameId, path only contains the folder here. - path += SConfig::GetInstance().GetUniqueID(); + path += SConfig::GetInstance().GetGameID(); std::string name; for (int i = 1; File::Exists(name = StringFromFormat("%s-%d.png", path.c_str(), i)); ++i) diff --git a/Source/Core/Core/HW/EXI_DeviceMemoryCard.cpp b/Source/Core/Core/HW/EXI_DeviceMemoryCard.cpp index 7e8749f0b7..e9f1be1eba 100644 --- a/Source/Core/Core/HW/EXI_DeviceMemoryCard.cpp +++ b/Source/Core/Core/HW/EXI_DeviceMemoryCard.cpp @@ -153,10 +153,10 @@ CEXIMemoryCard::CEXIMemoryCard(const int index, bool gciFolder) : card_index(ind void CEXIMemoryCard::SetupGciFolder(u16 sizeMb) { DiscIO::Country country_code = DiscIO::Country::COUNTRY_UNKNOWN; - auto strUniqueID = SConfig::GetInstance().m_strUniqueID; + std::string game_id = SConfig::GetInstance().m_strGameID; u32 CurrentGameId = 0; - if (strUniqueID == TITLEID_SYSMENU_STRING) + if (game_id == TITLEID_SYSMENU_STRING) { const DiscIO::CNANDContentLoader& SysMenu_Loader = DiscIO::CNANDContentManager::Access().GetNANDLoader(TITLEID_SYSMENU, @@ -166,10 +166,10 @@ void CEXIMemoryCard::SetupGciFolder(u16 sizeMb) country_code = DiscIO::CountrySwitch(SysMenu_Loader.GetCountryChar()); } } - else if (strUniqueID.length() >= 4) + else if (game_id.length() >= 4) { - country_code = DiscIO::CountrySwitch(strUniqueID.at(3)); - CurrentGameId = BE32((u8*)strUniqueID.c_str()); + country_code = DiscIO::CountrySwitch(game_id.at(3)); + CurrentGameId = BE32((u8*)game_id.c_str()); } bool ascii = true; std::string strDirectoryName = File::GetUserPath(D_GCUSER_IDX); diff --git a/Source/Core/Core/IPC_HLE/WII_Socket.cpp b/Source/Core/Core/IPC_HLE/WII_Socket.cpp index 73d21f8b66..793681158e 100644 --- a/Source/Core/Core/IPC_HLE/WII_Socket.cpp +++ b/Source/Core/Core/IPC_HLE/WII_Socket.cpp @@ -395,7 +395,7 @@ void WiiSocket::Update(bool read, bool write, bool except) if (SConfig::GetInstance().m_SSLDumpWrite && ret > 0) { std::string filename = File::GetUserPath(D_DUMPSSL_IDX) + - SConfig::GetInstance().GetUniqueID() + "_write.bin"; + SConfig::GetInstance().GetGameID() + "_write.bin"; File::IOFile(filename, "ab").WriteBytes(Memory::GetPointer(BufferOut2), ret); } @@ -433,7 +433,7 @@ void WiiSocket::Update(bool read, bool write, bool except) if (SConfig::GetInstance().m_SSLDumpRead && ret > 0) { std::string filename = File::GetUserPath(D_DUMPSSL_IDX) + - SConfig::GetInstance().GetUniqueID() + "_read.bin"; + SConfig::GetInstance().GetGameID() + "_read.bin"; File::IOFile(filename, "ab").WriteBytes(Memory::GetPointer(BufferIn2), ret); } diff --git a/Source/Core/Core/Movie.cpp b/Source/Core/Core/Movie.cpp index 1fe88259cc..50b130cc01 100644 --- a/Source/Core/Core/Movie.cpp +++ b/Source/Core/Core/Movie.cpp @@ -226,10 +226,10 @@ void Init() ReadHeader(); std::thread md5thread(CheckMD5); md5thread.detach(); - if (strncmp(tmpHeader.gameID, SConfig::GetInstance().GetUniqueID().c_str(), 6)) + if (strncmp(tmpHeader.gameID, SConfig::GetInstance().GetGameID().c_str(), 6)) { PanicAlertT("The recorded game (%s) is not the same as the selected game (%s)", - tmpHeader.gameID, SConfig::GetInstance().GetUniqueID().c_str()); + tmpHeader.gameID, SConfig::GetInstance().GetGameID().c_str()); EndPlayInput(false); } } @@ -1375,7 +1375,7 @@ void SaveRecording(const std::string& filename) header.filetype[1] = 'T'; header.filetype[2] = 'M'; header.filetype[3] = 0x1A; - strncpy(header.gameID, SConfig::GetInstance().GetUniqueID().c_str(), 6); + strncpy(header.gameID, SConfig::GetInstance().GetGameID().c_str(), 6); header.bWii = SConfig::GetInstance().bWii; header.numControllers = s_numPads & (SConfig::GetInstance().bWii ? 0xFF : 0x0F); diff --git a/Source/Core/Core/State.cpp b/Source/Core/Core/State.cpp index 1ad2b8cb26..583efe082d 100644 --- a/Source/Core/Core/State.cpp +++ b/Source/Core/Core/State.cpp @@ -338,7 +338,7 @@ static void CompressAndDumpState(CompressAndDumpState_args save_args) // Setting up the header StateHeader header; - strncpy(header.gameID, SConfig::GetInstance().GetUniqueID().c_str(), 6); + strncpy(header.gameID, SConfig::GetInstance().GetGameID().c_str(), 6); header.size = g_use_compression ? (u32)buffer_size : 0; header.time = Common::Timer::GetDoubleTime(); @@ -469,7 +469,7 @@ static void LoadFileStateData(const std::string& filename, std::vector& ret_ StateHeader header; f.ReadArray(&header, 1); - if (strncmp(SConfig::GetInstance().GetUniqueID().c_str(), header.gameID, 6)) + if (strncmp(SConfig::GetInstance().GetGameID().c_str(), header.gameID, 6)) { Core::DisplayMessage( StringFromFormat("State belongs to a different game (ID %.*s)", 6, header.gameID), 2000); @@ -657,7 +657,7 @@ void Shutdown() static std::string MakeStateFilename(int number) { return StringFromFormat("%s%s.s%02i", File::GetUserPath(D_STATESAVES_IDX).c_str(), - SConfig::GetInstance().GetUniqueID().c_str(), number); + SConfig::GetInstance().GetGameID().c_str(), number); } void Save(int slot, bool wait) diff --git a/Source/Core/DiscIO/Volume.h b/Source/Core/DiscIO/Volume.h index a73a3b9bb6..44af039cba 100644 --- a/Source/Core/DiscIO/Volume.h +++ b/Source/Core/DiscIO/Volume.h @@ -37,7 +37,7 @@ public: virtual bool GetTitleID(u64*) const { return false; } virtual std::vector GetTMD() const { return {}; } - virtual std::string GetUniqueID() const = 0; + virtual std::string GetGameID() const = 0; virtual std::string GetMakerID() const = 0; virtual u16 GetRevision() const = 0; virtual std::string GetInternalName() const = 0; diff --git a/Source/Core/DiscIO/VolumeDirectory.cpp b/Source/Core/DiscIO/VolumeDirectory.cpp index f37bfb44aa..9828319c08 100644 --- a/Source/Core/DiscIO/VolumeDirectory.cpp +++ b/Source/Core/DiscIO/VolumeDirectory.cpp @@ -35,7 +35,7 @@ CVolumeDirectory::CVolumeDirectory(const std::string& _rDirectory, bool _bIsWii, m_rootDirectory = ExtractDirectoryName(_rDirectory); // create the default disk header - SetUniqueID("AGBJ01"); + SetGameID("AGBJ01"); SetName("Default name"); if (_bIsWii) @@ -154,12 +154,12 @@ bool CVolumeDirectory::Read(u64 _Offset, u64 _Length, u8* _pBuffer, bool decrypt return true; } -std::string CVolumeDirectory::GetUniqueID() const +std::string CVolumeDirectory::GetGameID() const { return std::string(m_diskHeader.begin(), m_diskHeader.begin() + MAX_ID_LENGTH); } -void CVolumeDirectory::SetUniqueID(const std::string& id) +void CVolumeDirectory::SetGameID(const std::string& id) { memcpy(m_diskHeader.data(), id.c_str(), std::min(id.length(), MAX_ID_LENGTH)); } diff --git a/Source/Core/DiscIO/VolumeDirectory.h b/Source/Core/DiscIO/VolumeDirectory.h index f83f11cc2d..f06b47fded 100644 --- a/Source/Core/DiscIO/VolumeDirectory.h +++ b/Source/Core/DiscIO/VolumeDirectory.h @@ -40,8 +40,8 @@ public: bool Read(u64 _Offset, u64 _Length, u8* _pBuffer, bool decrypt) const override; - std::string GetUniqueID() const override; - void SetUniqueID(const std::string& _ID); + std::string GetGameID() const override; + void SetGameID(const std::string& _ID); std::string GetMakerID() const override; diff --git a/Source/Core/DiscIO/VolumeGC.cpp b/Source/Core/DiscIO/VolumeGC.cpp index 6dcbff569a..58faed4fe8 100644 --- a/Source/Core/DiscIO/VolumeGC.cpp +++ b/Source/Core/DiscIO/VolumeGC.cpp @@ -44,7 +44,7 @@ bool CVolumeGC::Read(u64 _Offset, u64 _Length, u8* _pBuffer, bool decrypt) const return m_pReader->Read(_Offset, _Length, _pBuffer); } -std::string CVolumeGC::GetUniqueID() const +std::string CVolumeGC::GetGameID() const { static const std::string NO_UID("NO_UID"); if (m_pReader == nullptr) diff --git a/Source/Core/DiscIO/VolumeGC.h b/Source/Core/DiscIO/VolumeGC.h index 6bf9693f7e..ca461949e2 100644 --- a/Source/Core/DiscIO/VolumeGC.h +++ b/Source/Core/DiscIO/VolumeGC.h @@ -27,7 +27,7 @@ public: CVolumeGC(std::unique_ptr reader); ~CVolumeGC(); bool Read(u64 _Offset, u64 _Length, u8* _pBuffer, bool decrypt = false) const override; - std::string GetUniqueID() const override; + std::string GetGameID() const override; std::string GetMakerID() const override; u16 GetRevision() const override; std::string GetInternalName() const override; diff --git a/Source/Core/DiscIO/VolumeWad.cpp b/Source/Core/DiscIO/VolumeWad.cpp index 90ad2045be..158be3dbca 100644 --- a/Source/Core/DiscIO/VolumeWad.cpp +++ b/Source/Core/DiscIO/VolumeWad.cpp @@ -74,7 +74,7 @@ Country CVolumeWAD::GetCountry() const return CountrySwitch(country_code); } -std::string CVolumeWAD::GetUniqueID() const +std::string CVolumeWAD::GetGameID() const { char GameCode[6]; if (!Read(m_offset + 0x01E0, 4, (u8*)GameCode)) diff --git a/Source/Core/DiscIO/VolumeWad.h b/Source/Core/DiscIO/VolumeWad.h index 93980fdf1b..68fc6a7612 100644 --- a/Source/Core/DiscIO/VolumeWad.h +++ b/Source/Core/DiscIO/VolumeWad.h @@ -30,7 +30,7 @@ public: ~CVolumeWAD(); bool Read(u64 _Offset, u64 _Length, u8* _pBuffer, bool decrypt = false) const override; bool GetTitleID(u64* buffer) const override; - std::string GetUniqueID() const override; + std::string GetGameID() const override; std::string GetMakerID() const override; u16 GetRevision() const override; std::string GetInternalName() const override { return ""; } diff --git a/Source/Core/DiscIO/VolumeWiiCrypted.cpp b/Source/Core/DiscIO/VolumeWiiCrypted.cpp index f58b85876e..09224e04aa 100644 --- a/Source/Core/DiscIO/VolumeWiiCrypted.cpp +++ b/Source/Core/DiscIO/VolumeWiiCrypted.cpp @@ -140,7 +140,7 @@ std::vector CVolumeWiiCrypted::GetTMD() const return buffer; } -std::string CVolumeWiiCrypted::GetUniqueID() const +std::string CVolumeWiiCrypted::GetGameID() const { if (m_pReader == nullptr) return std::string(); diff --git a/Source/Core/DiscIO/VolumeWiiCrypted.h b/Source/Core/DiscIO/VolumeWiiCrypted.h index 74c3c4a62e..9bb449980d 100644 --- a/Source/Core/DiscIO/VolumeWiiCrypted.h +++ b/Source/Core/DiscIO/VolumeWiiCrypted.h @@ -31,7 +31,7 @@ public: bool Read(u64 _Offset, u64 _Length, u8* _pBuffer, bool decrypt) const override; bool GetTitleID(u64* buffer) const override; std::vector GetTMD() const override; - std::string GetUniqueID() const override; + std::string GetGameID() const override; std::string GetMakerID() const override; u16 GetRevision() const override; std::string GetInternalName() const override; diff --git a/Source/Core/DolphinQt2/Config/InfoWidget.cpp b/Source/Core/DolphinQt2/Config/InfoWidget.cpp index 46fa55559c..bdf1aa6b89 100644 --- a/Source/Core/DolphinQt2/Config/InfoWidget.cpp +++ b/Source/Core/DolphinQt2/Config/InfoWidget.cpp @@ -32,7 +32,7 @@ QGroupBox* InfoWidget::CreateISODetails() QLineEdit* file_path = CreateValueDisplay(m_game.GetFilePath()); QLineEdit* internal_name = CreateValueDisplay(m_game.GetInternalName()); - QLineEdit* game_id = CreateValueDisplay(m_game.GetUniqueID()); + QLineEdit* game_id = CreateValueDisplay(m_game.GetGameID()); QLineEdit* country = CreateValueDisplay(m_game.GetCountry()); QLineEdit* maker = CreateValueDisplay(m_game.GetMaker()); QLineEdit* maker_id = CreateValueDisplay(QStringLiteral("0x") + m_game.GetMakerID()); diff --git a/Source/Core/DolphinQt2/Config/PropertiesDialog.cpp b/Source/Core/DolphinQt2/Config/PropertiesDialog.cpp index 6d00e21b9b..23527880cb 100644 --- a/Source/Core/DolphinQt2/Config/PropertiesDialog.cpp +++ b/Source/Core/DolphinQt2/Config/PropertiesDialog.cpp @@ -12,7 +12,7 @@ PropertiesDialog::PropertiesDialog(QWidget* parent, const GameFile& game) : QDialog(parent) { - setWindowTitle(QStringLiteral("%1: %2").arg(game.GetUniqueID()).arg(game.GetLongName())); + setWindowTitle(QStringLiteral("%1: %2").arg(game.GetGameID()).arg(game.GetLongName())); QVBoxLayout* layout = new QVBoxLayout(); QTabWidget* tab_widget = new QTabWidget(this); diff --git a/Source/Core/DolphinQt2/GameList/GameFile.cpp b/Source/Core/DolphinQt2/GameList/GameFile.cpp index b8d8a720ea..f27f3a6683 100644 --- a/Source/Core/DolphinQt2/GameList/GameFile.cpp +++ b/Source/Core/DolphinQt2/GameList/GameFile.cpp @@ -102,7 +102,7 @@ bool GameFile::LoadFileInfo(const QString& path) void GameFile::LoadState() { - IniFile ini = SConfig::LoadGameIni(m_unique_id.toStdString(), m_revision); + IniFile ini = SConfig::LoadGameIni(m_game_id.toStdString(), m_revision); std::string issues_temp; ini.GetIfExists("EmuState", "EmulationStateId", &m_rating); ini.GetIfExists("EmuState", "EmulationIssues", &issues_temp); @@ -142,7 +142,7 @@ bool GameFile::TryLoadVolume() if (volume == nullptr) return false; - m_unique_id = QString::fromStdString(volume->GetUniqueID()); + m_game_id = QString::fromStdString(volume->GetGameID()); std::string maker_id = volume->GetMakerID(); m_maker = QString::fromStdString(DiscIO::GetCompanyFromID(maker_id)); m_maker_id = QString::fromStdString(maker_id); diff --git a/Source/Core/DolphinQt2/GameList/GameFile.h b/Source/Core/DolphinQt2/GameList/GameFile.h index 7c12326476..99d9a143e2 100644 --- a/Source/Core/DolphinQt2/GameList/GameFile.h +++ b/Source/Core/DolphinQt2/GameList/GameFile.h @@ -34,7 +34,7 @@ public: QString GetFileFolder() const { return m_folder; } qint64 GetFileSize() const { return m_size; } // The rest will not. - QString GetUniqueID() const { return m_unique_id; } + QString GetGameID() const { return m_game_id; } QString GetMakerID() const { return m_maker_id; } QString GetMaker() const { return m_maker; } u16 GetRevision() const { return m_revision; } @@ -84,7 +84,7 @@ private: QDateTime m_last_modified; qint64 m_size = 0; - QString m_unique_id; + QString m_game_id; QString m_maker; QString m_maker_id; u16 m_revision = 0; diff --git a/Source/Core/DolphinQt2/GameList/GameList.cpp b/Source/Core/DolphinQt2/GameList/GameList.cpp index e529611dbe..637ddd93ea 100644 --- a/Source/Core/DolphinQt2/GameList/GameList.cpp +++ b/Source/Core/DolphinQt2/GameList/GameList.cpp @@ -128,7 +128,7 @@ void GameList::OpenProperties() void GameList::OpenWiki() { - QString game_id = GameFile(GetSelectedGame()).GetUniqueID(); + QString game_id = GameFile(GetSelectedGame()).GetGameID(); QString url = QStringLiteral("https://wiki.dolphin-emu.org/index.php?title=").append(game_id); QDesktopServices::openUrl(QUrl(url)); } diff --git a/Source/Core/DolphinQt2/GameList/GameListModel.cpp b/Source/Core/DolphinQt2/GameList/GameListModel.cpp index e9c81a77d8..97a9337add 100644 --- a/Source/Core/DolphinQt2/GameList/GameListModel.cpp +++ b/Source/Core/DolphinQt2/GameList/GameListModel.cpp @@ -30,7 +30,7 @@ QVariant GameListModel::data(const QModelIndex& index, int role) const case COL_TITLE: return game->GetLongName(); case COL_ID: - return game->GetUniqueID(); + return game->GetGameID(); case COL_DESCRIPTION: return game->GetDescription(); case COL_MAKER: diff --git a/Source/Core/DolphinWX/Cheats/CheatsWindow.cpp b/Source/Core/DolphinWX/Cheats/CheatsWindow.cpp index af4ec1c177..c982710fc5 100644 --- a/Source/Core/DolphinWX/Cheats/CheatsWindow.cpp +++ b/Source/Core/DolphinWX/Cheats/CheatsWindow.cpp @@ -176,7 +176,7 @@ void wxCheatsWindow::UpdateGUI() const SConfig& parameters = SConfig::GetInstance(); m_gameini_default = parameters.LoadDefaultGameIni(); m_gameini_local = parameters.LoadLocalGameIni(); - m_game_id = parameters.GetUniqueID(); + m_game_id = parameters.GetGameID(); m_game_revision = parameters.m_revision; m_gameini_local_path = File::GetUserPath(D_GAMESETTINGS_IDX) + m_game_id + ".ini"; Load_ARCodes(); diff --git a/Source/Core/DolphinWX/Debugger/BreakpointWindow.cpp b/Source/Core/DolphinWX/Debugger/BreakpointWindow.cpp index 2c8bc82ab6..5a1edf7117 100644 --- a/Source/Core/DolphinWX/Debugger/BreakpointWindow.cpp +++ b/Source/Core/DolphinWX/Debugger/BreakpointWindow.cpp @@ -164,11 +164,11 @@ void CBreakPointWindow::SaveAll() { // simply dump all to bp/mc files in a way we can read again IniFile ini; - ini.Load(File::GetUserPath(D_GAMESETTINGS_IDX) + SConfig::GetInstance().GetUniqueID() + ".ini", + ini.Load(File::GetUserPath(D_GAMESETTINGS_IDX) + SConfig::GetInstance().GetGameID() + ".ini", false); ini.SetLines("BreakPoints", PowerPC::breakpoints.GetStrings()); ini.SetLines("MemoryBreakPoints", PowerPC::memchecks.GetStrings()); - ini.Save(File::GetUserPath(D_GAMESETTINGS_IDX) + SConfig::GetInstance().GetUniqueID() + ".ini"); + ini.Save(File::GetUserPath(D_GAMESETTINGS_IDX) + SConfig::GetInstance().GetGameID() + ".ini"); } void CBreakPointWindow::Event_LoadAll(wxCommandEvent& WXUNUSED(event)) @@ -183,8 +183,7 @@ void CBreakPointWindow::LoadAll() BreakPoints::TBreakPointsStr newbps; MemChecks::TMemChecksStr newmcs; - if (!ini.Load(File::GetUserPath(D_GAMESETTINGS_IDX) + SConfig::GetInstance().GetUniqueID() + - ".ini", + if (!ini.Load(File::GetUserPath(D_GAMESETTINGS_IDX) + SConfig::GetInstance().GetGameID() + ".ini", false)) { return; diff --git a/Source/Core/DolphinWX/Debugger/DebuggerPanel.cpp b/Source/Core/DolphinWX/Debugger/DebuggerPanel.cpp index b8a909bf85..0503d778a9 100644 --- a/Source/Core/DolphinWX/Debugger/DebuggerPanel.cpp +++ b/Source/Core/DolphinWX/Debugger/DebuggerPanel.cpp @@ -232,7 +232,7 @@ void GFXDebuggerPanel::OnPauseAtNextFrameButton(wxCommandEvent& event) void GFXDebuggerPanel::OnDumpButton(wxCommandEvent& event) { std::string dump_path = - File::GetUserPath(D_DUMP_IDX) + "Debug/" + SConfig::GetInstance().m_strUniqueID + "/"; + File::GetUserPath(D_DUMP_IDX) + "Debug/" + SConfig::GetInstance().m_strGameID + "/"; if (!File::CreateFullPath(dump_path)) return; diff --git a/Source/Core/DolphinWX/Debugger/WatchWindow.cpp b/Source/Core/DolphinWX/Debugger/WatchWindow.cpp index 45a55eebe5..486e8bc2f5 100644 --- a/Source/Core/DolphinWX/Debugger/WatchWindow.cpp +++ b/Source/Core/DolphinWX/Debugger/WatchWindow.cpp @@ -94,10 +94,10 @@ void CWatchWindow::Event_SaveAll(wxCommandEvent& WXUNUSED(event)) void CWatchWindow::SaveAll() { IniFile ini; - ini.Load(File::GetUserPath(D_GAMESETTINGS_IDX) + SConfig::GetInstance().GetUniqueID() + ".ini", + ini.Load(File::GetUserPath(D_GAMESETTINGS_IDX) + SConfig::GetInstance().GetGameID() + ".ini", false); ini.SetLines("Watches", PowerPC::watches.GetStrings()); - ini.Save(File::GetUserPath(D_GAMESETTINGS_IDX) + SConfig::GetInstance().GetUniqueID() + ".ini"); + ini.Save(File::GetUserPath(D_GAMESETTINGS_IDX) + SConfig::GetInstance().GetGameID() + ".ini"); } void CWatchWindow::Event_LoadAll(wxCommandEvent& WXUNUSED(event)) @@ -110,8 +110,7 @@ void CWatchWindow::LoadAll() IniFile ini; Watches::TWatchesStr watches; - if (!ini.Load(File::GetUserPath(D_GAMESETTINGS_IDX) + SConfig::GetInstance().GetUniqueID() + - ".ini", + if (!ini.Load(File::GetUserPath(D_GAMESETTINGS_IDX) + SConfig::GetInstance().GetGameID() + ".ini", false)) { return; diff --git a/Source/Core/DolphinWX/Frame.cpp b/Source/Core/DolphinWX/Frame.cpp index 5978dfc49d..8cfba6d1c1 100644 --- a/Source/Core/DolphinWX/Frame.cpp +++ b/Source/Core/DolphinWX/Frame.cpp @@ -141,7 +141,7 @@ bool CRenderFrame::IsValidSavestateDropped(const std::string& filepath) std::string internal_game_id(game_id_length, ' '); file.read(&internal_game_id[0], game_id_length); - return internal_game_id == SConfig::GetInstance().GetUniqueID(); + return internal_game_id == SConfig::GetInstance().GetGameID(); } #ifdef _WIN32 diff --git a/Source/Core/DolphinWX/GameListCtrl.cpp b/Source/Core/DolphinWX/GameListCtrl.cpp index 858d273996..1b5c27e167 100644 --- a/Source/Core/DolphinWX/GameListCtrl.cpp +++ b/Source/Core/DolphinWX/GameListCtrl.cpp @@ -97,8 +97,8 @@ static int CompareGameListItems(const GameListItem* iso1, const GameListItem* is case CGameListCtrl::COLUMN_TITLE: if (!strcasecmp(iso1->GetName().c_str(), iso2->GetName().c_str())) { - if (iso1->GetUniqueID() != iso2->GetUniqueID()) - return t * (iso1->GetUniqueID() > iso2->GetUniqueID() ? 1 : -1); + if (iso1->GetGameID() != iso2->GetGameID()) + return t * (iso1->GetGameID() > iso2->GetGameID() ? 1 : -1); if (iso1->GetRevision() != iso2->GetRevision()) return t * (iso1->GetRevision() > iso2->GetRevision() ? 1 : -1); if (iso1->GetDiscNumber() != iso2->GetDiscNumber()) @@ -118,7 +118,7 @@ static int CompareGameListItems(const GameListItem* iso1, const GameListItem* is wxFileNameFromPath(iso2->GetFileName())) * t; case CGameListCtrl::COLUMN_ID: - return strcasecmp(iso1->GetUniqueID().c_str(), iso2->GetUniqueID().c_str()) * t; + return strcasecmp(iso1->GetGameID().c_str(), iso2->GetGameID().c_str()) * t; case CGameListCtrl::COLUMN_COUNTRY: if (iso1->GetCountry() > iso2->GetCountry()) return 1 * t; @@ -479,7 +479,7 @@ void CGameListCtrl::UpdateItemAtColumn(long _Index, int column) SetItem(_Index, COLUMN_SIZE, NiceSizeFormat(rISOFile.GetFileSize()), -1); break; case COLUMN_ID: - SetItem(_Index, COLUMN_ID, rISOFile.GetUniqueID(), -1); + SetItem(_Index, COLUMN_ID, rISOFile.GetGameID(), -1); break; } } @@ -716,7 +716,7 @@ void CGameListCtrl::OnLocalIniModified(wxCommandEvent& ev) // physical copies in the search paths. for (std::size_t i = 0; i < m_ISOFiles.size(); ++i) { - if (m_ISOFiles[i]->GetUniqueID() != game_id) + if (m_ISOFiles[i]->GetGameID() != game_id) continue; m_ISOFiles[i]->ReloadINI(); @@ -1152,7 +1152,7 @@ void CGameListCtrl::OnWiki(wxCommandEvent& WXUNUSED(event)) return; std::string wikiUrl = - "https://wiki.dolphin-emu.org/dolphin-redirect.php?gameid=" + iso->GetUniqueID(); + "https://wiki.dolphin-emu.org/dolphin-redirect.php?gameid=" + iso->GetGameID(); WxUtils::Launch(wikiUrl); } diff --git a/Source/Core/DolphinWX/ISOFile.cpp b/Source/Core/DolphinWX/ISOFile.cpp index 05379a98a8..e1ee632406 100644 --- a/Source/Core/DolphinWX/ISOFile.cpp +++ b/Source/Core/DolphinWX/ISOFile.cpp @@ -104,7 +104,7 @@ GameListItem::GameListItem(const std::string& _rFileName, m_FileSize = volume->GetRawSize(); m_VolumeSize = volume->GetSize(); - m_UniqueID = volume->GetUniqueID(); + m_game_id = volume->GetGameID(); volume->GetTitleID(&m_title_id); m_disc_number = volume->GetDiscNumber(); m_Revision = volume->GetRevision(); @@ -117,18 +117,18 @@ GameListItem::GameListItem(const std::string& _rFileName, } } - if (m_company.empty() && m_UniqueID.size() >= 6) - m_company = DiscIO::GetCompanyFromID(m_UniqueID.substr(4, 2)); + if (m_company.empty() && m_game_id.size() >= 6) + m_company = DiscIO::GetCompanyFromID(m_game_id.substr(4, 2)); if (IsValid()) { - std::string game_id = m_UniqueID; + std::string short_game_id = m_game_id; // Ignore publisher ID for WAD files - if (m_Platform == DiscIO::Platform::WII_WAD && game_id.size() > 4) - game_id.erase(4); + if (m_Platform == DiscIO::Platform::WII_WAD && short_game_id.size() > 4) + short_game_id.erase(4); - auto it = custom_titles.find(game_id); + auto it = custom_titles.find(short_game_id); if (it != custom_titles.end()) { m_custom_name_titles_txt = it->second; @@ -179,7 +179,7 @@ void GameListItem::ReloadINI() if (!IsValid()) return; - IniFile ini = SConfig::LoadGameIni(m_UniqueID, m_Revision); + IniFile ini = SConfig::LoadGameIni(m_game_id, m_Revision); ini.GetIfExists("EmuState", "EmulationStateId", &m_emu_state, 0); ini.GetIfExists("EmuState", "EmulationIssues", &m_issues, std::string()); @@ -210,7 +210,7 @@ void GameListItem::DoState(PointerWrap& p) p.Do(m_names); p.Do(m_descriptions); p.Do(m_company); - p.Do(m_UniqueID); + p.Do(m_game_id); p.Do(m_title_id); p.Do(m_FileSize); p.Do(m_VolumeSize); @@ -316,8 +316,8 @@ std::string GameListItem::GetUniqueIdentifier() const { const DiscIO::Language lang = DiscIO::Language::LANGUAGE_ENGLISH; std::vector info; - if (!GetUniqueID().empty()) - info.push_back(GetUniqueID()); + if (!GetGameID().empty()) + info.push_back(GetGameID()); if (GetRevision() != 0) { std::string rev_str = "Revision "; diff --git a/Source/Core/DolphinWX/ISOFile.h b/Source/Core/DolphinWX/ISOFile.h index b8b0127e70..3893c01777 100644 --- a/Source/Core/DolphinWX/ISOFile.h +++ b/Source/Core/DolphinWX/ISOFile.h @@ -46,7 +46,7 @@ public: std::vector GetLanguages() const; std::string GetCompany() const { return m_company; } u16 GetRevision() const { return m_Revision; } - const std::string& GetUniqueID() const { return m_UniqueID; } + const std::string& GetGameID() const { return m_game_id; } const std::string GetWiiFSPath() const; DiscIO::Country GetCountry() const { return m_Country; } DiscIO::Platform GetPlatform() const { return m_Platform; } @@ -73,7 +73,7 @@ private: std::map m_descriptions; std::string m_company; - std::string m_UniqueID; + std::string m_game_id; u64 m_title_id; std::string m_issues; diff --git a/Source/Core/DolphinWX/ISOProperties.cpp b/Source/Core/DolphinWX/ISOProperties.cpp index c5f084f70b..245d32824c 100644 --- a/Source/Core/DolphinWX/ISOProperties.cpp +++ b/Source/Core/DolphinWX/ISOProperties.cpp @@ -95,7 +95,7 @@ public: State new_state = State::Hidden; if (!SConfig::GetInstance().bEnableCheats) new_state = State::DisabledCheats; - else if (Core::IsRunning() && SConfig::GetInstance().GetUniqueID() == m_game_id) + else if (Core::IsRunning() && SConfig::GetInstance().GetGameID() == m_game_id) new_state = State::GameRunning; ApplyState(new_state); } @@ -217,7 +217,7 @@ CISOProperties::CISOProperties(const GameListItem& game_list_item, wxWindow* par // Load ISO data m_open_iso = DiscIO::CreateVolumeFromFilename(OpenGameListItem.GetFileName()); - game_id = m_open_iso->GetUniqueID(); + game_id = m_open_iso->GetGameID(); // Load game INIs GameIniFileLocal = File::GetUserPath(D_GAMESETTINGS_IDX) + game_id + ".ini"; @@ -232,7 +232,7 @@ CISOProperties::CISOProperties(const GameListItem& game_list_item, wxWindow* par // Disk header and apploader m_InternalName->SetValue(StrToWxStr(m_open_iso->GetInternalName())); - m_GameID->SetValue(StrToWxStr(m_open_iso->GetUniqueID())); + m_GameID->SetValue(StrToWxStr(m_open_iso->GetGameID())); switch (m_open_iso->GetCountry()) { case DiscIO::Country::COUNTRY_AUSTRALIA: @@ -1270,7 +1270,7 @@ void CISOProperties::LoadGameConfig() PatchList_Load(); m_ar_code_panel->LoadCodes(GameIniDefault, GameIniLocal); - m_geckocode_panel->LoadCodes(GameIniDefault, GameIniLocal, m_open_iso->GetUniqueID()); + m_geckocode_panel->LoadCodes(GameIniDefault, GameIniLocal, m_open_iso->GetGameID()); } void CISOProperties::SaveGameIniValueFrom3StateCheckbox(const char* section, const char* key, @@ -1593,6 +1593,6 @@ void CISOProperties::ChangeBannerDetails(DiscIO::Language language) filename = path + ' '; // Also sets the window's title SetTitle(StrToWxStr(StringFromFormat("%s%s: %s - ", filename.c_str(), extension.c_str(), - OpenGameListItem.GetUniqueID().c_str())) + + OpenGameListItem.GetGameID().c_str())) + name); } diff --git a/Source/Core/InputCommon/InputConfig.cpp b/Source/Core/InputCommon/InputConfig.cpp index 019ddeb414..cb4ea376bd 100644 --- a/Source/Core/InputCommon/InputConfig.cpp +++ b/Source/Core/InputCommon/InputConfig.cpp @@ -21,7 +21,7 @@ bool InputConfig::LoadConfig(bool isGC) std::string profile[MAX_BBMOTES]; std::string path; - if (SConfig::GetInstance().GetUniqueID() != "00000000") + if (SConfig::GetInstance().GetGameID() != "00000000") { std::string type; if (isGC) diff --git a/Source/Core/VideoBackends/D3D/GeometryShaderCache.cpp b/Source/Core/VideoBackends/D3D/GeometryShaderCache.cpp index a698b4bfbb..85b84eaf0d 100644 --- a/Source/Core/VideoBackends/D3D/GeometryShaderCache.cpp +++ b/Source/Core/VideoBackends/D3D/GeometryShaderCache.cpp @@ -160,7 +160,7 @@ void GeometryShaderCache::Init() std::string cache_filename = StringFromFormat("%sdx11-%s-gs.cache", File::GetUserPath(D_SHADERCACHE_IDX).c_str(), - SConfig::GetInstance().m_strUniqueID.c_str()); + SConfig::GetInstance().m_strGameID.c_str()); GeometryShaderCacheInserter inserter; g_gs_disk_cache.OpenAndRead(cache_filename, inserter); diff --git a/Source/Core/VideoBackends/D3D/PixelShaderCache.cpp b/Source/Core/VideoBackends/D3D/PixelShaderCache.cpp index 91e4e52453..df65d562e0 100644 --- a/Source/Core/VideoBackends/D3D/PixelShaderCache.cpp +++ b/Source/Core/VideoBackends/D3D/PixelShaderCache.cpp @@ -500,7 +500,7 @@ void PixelShaderCache::Init() std::string cache_filename = StringFromFormat("%sdx11-%s-ps.cache", File::GetUserPath(D_SHADERCACHE_IDX).c_str(), - SConfig::GetInstance().m_strUniqueID.c_str()); + SConfig::GetInstance().m_strGameID.c_str()); PixelShaderCacheInserter inserter; g_ps_disk_cache.OpenAndRead(cache_filename, inserter); diff --git a/Source/Core/VideoBackends/D3D/VertexShaderCache.cpp b/Source/Core/VideoBackends/D3D/VertexShaderCache.cpp index c83f3fb207..02b027f2ba 100644 --- a/Source/Core/VideoBackends/D3D/VertexShaderCache.cpp +++ b/Source/Core/VideoBackends/D3D/VertexShaderCache.cpp @@ -161,7 +161,7 @@ void VertexShaderCache::Init() std::string cache_filename = StringFromFormat("%sdx11-%s-vs.cache", File::GetUserPath(D_SHADERCACHE_IDX).c_str(), - SConfig::GetInstance().m_strUniqueID.c_str()); + SConfig::GetInstance().m_strGameID.c_str()); VertexShaderCacheInserter inserter; g_vs_disk_cache.OpenAndRead(cache_filename, inserter); diff --git a/Source/Core/VideoBackends/D3D12/D3DState.cpp b/Source/Core/VideoBackends/D3D12/D3DState.cpp index 6d87c974ea..e1f4ee6651 100644 --- a/Source/Core/VideoBackends/D3D12/D3DState.cpp +++ b/Source/Core/VideoBackends/D3D12/D3DState.cpp @@ -143,7 +143,7 @@ void StateCache::Init() std::string cache_filename = StringFromFormat("%sdx12-%s-pso.cache", File::GetUserPath(D_SHADERCACHE_IDX).c_str(), - SConfig::GetInstance().m_strUniqueID.c_str()); + SConfig::GetInstance().m_strGameID.c_str()); PipelineStateCacheInserter inserter; s_pso_disk_cache.OpenAndRead(cache_filename, inserter); diff --git a/Source/Core/VideoBackends/D3D12/ShaderCache.cpp b/Source/Core/VideoBackends/D3D12/ShaderCache.cpp index f0fb71aaca..3cd1bc03a7 100644 --- a/Source/Core/VideoBackends/D3D12/ShaderCache.cpp +++ b/Source/Core/VideoBackends/D3D12/ShaderCache.cpp @@ -75,14 +75,14 @@ void ShaderCache::Init() if (!File::Exists(shader_cache_path)) File::CreateDir(File::GetUserPath(D_SHADERCACHE_IDX)); - std::string title_unique_id = SConfig::GetInstance().m_strUniqueID.c_str(); + std::string title_game_id = SConfig::GetInstance().m_strGameID.c_str(); std::string gs_cache_filename = - StringFromFormat("%sdx11-%s-gs.cache", shader_cache_path.c_str(), title_unique_id.c_str()); + StringFromFormat("%sdx11-%s-gs.cache", shader_cache_path.c_str(), title_game_id.c_str()); std::string ps_cache_filename = - StringFromFormat("%sdx11-%s-ps.cache", shader_cache_path.c_str(), title_unique_id.c_str()); + StringFromFormat("%sdx11-%s-ps.cache", shader_cache_path.c_str(), title_game_id.c_str()); std::string vs_cache_filename = - StringFromFormat("%sdx11-%s-vs.cache", shader_cache_path.c_str(), title_unique_id.c_str()); + StringFromFormat("%sdx11-%s-vs.cache", shader_cache_path.c_str(), title_game_id.c_str()); ShaderCacheInserter gs_inserter; s_gs_disk_cache.OpenAndRead(gs_cache_filename, gs_inserter); diff --git a/Source/Core/VideoBackends/OGL/ProgramShaderCache.cpp b/Source/Core/VideoBackends/OGL/ProgramShaderCache.cpp index f49fa3718b..912b60e40d 100644 --- a/Source/Core/VideoBackends/OGL/ProgramShaderCache.cpp +++ b/Source/Core/VideoBackends/OGL/ProgramShaderCache.cpp @@ -432,7 +432,7 @@ void ProgramShaderCache::Init() std::string cache_filename = StringFromFormat("%sogl-%s-shaders.cache", File::GetUserPath(D_SHADERCACHE_IDX).c_str(), - SConfig::GetInstance().m_strUniqueID.c_str()); + SConfig::GetInstance().m_strGameID.c_str()); ProgramShaderCacheInserter inserter; g_program_disk_cache.OpenAndRead(cache_filename, inserter); diff --git a/Source/Core/VideoBackends/Vulkan/ObjectCache.cpp b/Source/Core/VideoBackends/Vulkan/ObjectCache.cpp index d1e874cac6..e5e65c1a73 100644 --- a/Source/Core/VideoBackends/Vulkan/ObjectCache.cpp +++ b/Source/Core/VideoBackends/Vulkan/ObjectCache.cpp @@ -291,7 +291,7 @@ VkPipeline ObjectCache::GetPipeline(const PipelineInfo& info) std::string ObjectCache::GetDiskCacheFileName(const char* type) { return StringFromFormat("%svulkan-%s-%s.cache", File::GetUserPath(D_SHADERCACHE_IDX).c_str(), - SConfig::GetInstance().m_strUniqueID.c_str(), type); + SConfig::GetInstance().m_strGameID.c_str(), type); } class PipelineCacheReadCallback : public LinearDiskCacheReader diff --git a/Source/Core/VideoCommon/HiresTextures.cpp b/Source/Core/VideoCommon/HiresTextures.cpp index 56798d006e..e9589f7218 100644 --- a/Source/Core/VideoCommon/HiresTextures.cpp +++ b/Source/Core/VideoCommon/HiresTextures.cpp @@ -85,7 +85,7 @@ void HiresTexture::Update() s_textureCache.clear(); } - const std::string& game_id = SConfig::GetInstance().m_strUniqueID; + const std::string& game_id = SConfig::GetInstance().m_strGameID; const std::string texture_directory = GetTextureDirectory(game_id); std::vector extensions{ ".png", ".bmp", ".tga", ".dds", @@ -224,7 +224,7 @@ std::string HiresTexture::GenBaseName(const u8* texture, size_t texture_size, co u64 tlut_hash = tlut_size ? GetHashHiresTexture(tlut, (int)tlut_size, g_ActiveConfig.iSafeTextureCache_ColorSamples) : 0; - name = StringFromFormat("%s_%08x_%i", SConfig::GetInstance().m_strUniqueID.c_str(), + name = StringFromFormat("%s_%08x_%i", SConfig::GetInstance().m_strGameID.c_str(), (u32)(tex_hash ^ tlut_hash), (u16)format); if (s_textureMap.find(name) != s_textureMap.end()) { diff --git a/Source/Core/VideoCommon/TextureCacheBase.cpp b/Source/Core/VideoCommon/TextureCacheBase.cpp index 0f8a39b341..05546f940e 100644 --- a/Source/Core/VideoCommon/TextureCacheBase.cpp +++ b/Source/Core/VideoCommon/TextureCacheBase.cpp @@ -446,7 +446,7 @@ TextureCacheBase::DoPartialTextureUpdates(TexCache::iterator iter_t, u8* palette void TextureCacheBase::DumpTexture(TCacheEntryBase* entry, std::string basename, unsigned int level) { - std::string szDir = File::GetUserPath(D_DUMPTEXTURES_IDX) + SConfig::GetInstance().m_strUniqueID; + std::string szDir = File::GetUserPath(D_DUMPTEXTURES_IDX) + SConfig::GetInstance().m_strGameID; // make sure that the directory exists if (!File::Exists(szDir) || !File::IsDirectory(szDir))