mirror of
https://github.com/dolphin-emu/dolphin.git
synced 2025-07-31 10:09:36 -06:00
DiscIO/SConfig: Rename GetUniqueID to GetGameID
We call this "game ID" everywhere else, and it's not actually completely unique.
This commit is contained in:
@ -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();
|
||||
|
@ -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;
|
||||
|
@ -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;
|
||||
|
||||
|
@ -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;
|
||||
|
@ -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
|
||||
|
@ -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);
|
||||
}
|
||||
|
||||
|
@ -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<std::string> info;
|
||||
if (!GetUniqueID().empty())
|
||||
info.push_back(GetUniqueID());
|
||||
if (!GetGameID().empty())
|
||||
info.push_back(GetGameID());
|
||||
if (GetRevision() != 0)
|
||||
{
|
||||
std::string rev_str = "Revision ";
|
||||
|
@ -46,7 +46,7 @@ public:
|
||||
std::vector<DiscIO::Language> 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<DiscIO::Language, std::string> m_descriptions;
|
||||
std::string m_company;
|
||||
|
||||
std::string m_UniqueID;
|
||||
std::string m_game_id;
|
||||
u64 m_title_id;
|
||||
|
||||
std::string m_issues;
|
||||
|
@ -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);
|
||||
}
|
||||
|
Reference in New Issue
Block a user