Merge pull request #4401 from JosJuice/rename-getuniqueid
DiscIO/SConfig: Rename GetUniqueID to GetGameID
This commit is contained in:
commit
d5ca153c26
|
@ -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;
|
||||
}
|
||||
|
|
|
@ -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);
|
||||
|
|
|
@ -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<u8> tmd_buffer = pVolume.GetTMD();
|
||||
if (!tmd_buffer.empty())
|
||||
|
|
|
@ -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());
|
||||
}
|
||||
|
||||
|
|
|
@ -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)
|
||||
|
|
|
@ -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;
|
||||
|
||||
|
|
|
@ -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)
|
||||
|
|
|
@ -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);
|
||||
|
|
|
@ -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);
|
||||
}
|
||||
|
||||
|
|
|
@ -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);
|
||||
|
||||
|
|
|
@ -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<u8>& 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)
|
||||
|
|
|
@ -37,7 +37,7 @@ public:
|
|||
|
||||
virtual bool GetTitleID(u64*) const { return false; }
|
||||
virtual std::vector<u8> 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;
|
||||
|
|
|
@ -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));
|
||||
}
|
||||
|
|
|
@ -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;
|
||||
|
||||
|
|
|
@ -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)
|
||||
|
|
|
@ -27,7 +27,7 @@ public:
|
|||
CVolumeGC(std::unique_ptr<IBlobReader> 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;
|
||||
|
|
|
@ -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))
|
||||
|
|
|
@ -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 ""; }
|
||||
|
|
|
@ -140,7 +140,7 @@ std::vector<u8> CVolumeWiiCrypted::GetTMD() const
|
|||
return buffer;
|
||||
}
|
||||
|
||||
std::string CVolumeWiiCrypted::GetUniqueID() const
|
||||
std::string CVolumeWiiCrypted::GetGameID() const
|
||||
{
|
||||
if (m_pReader == nullptr)
|
||||
return std::string();
|
||||
|
|
|
@ -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<u8> 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;
|
||||
|
|
|
@ -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());
|
||||
|
|
|
@ -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);
|
||||
|
|
|
@ -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);
|
||||
|
|
|
@ -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;
|
||||
|
|
|
@ -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));
|
||||
}
|
||||
|
|
|
@ -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:
|
||||
|
|
|
@ -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;
|
||||
|
|
|
@ -142,7 +142,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);
|
||||
}
|
||||
|
|
|
@ -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)
|
||||
|
|
|
@ -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);
|
||||
|
||||
|
|
|
@ -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);
|
||||
|
||||
|
|
|
@ -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);
|
||||
|
||||
|
|
|
@ -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);
|
||||
|
|
|
@ -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<GeometryShaderUid, GsBytecodeCache, &s_gs_bytecode_cache> gs_inserter;
|
||||
s_gs_disk_cache.OpenAndRead(gs_cache_filename, gs_inserter);
|
||||
|
|
|
@ -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);
|
||||
|
|
|
@ -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<u32, u8>
|
||||
|
|
|
@ -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<std::string> 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())
|
||||
{
|
||||
|
|
|
@ -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))
|
||||
|
|
Loading…
Reference in New Issue