mirror of
https://github.com/dolphin-emu/dolphin.git
synced 2025-07-24 06:39:46 -06:00
Implement Triforce ID parsing
This commit is contained in:
@ -131,6 +131,7 @@ GameFile::GameFile(std::string path) : m_file_path(std::move(path))
|
||||
m_internal_name = volume->GetInternalName();
|
||||
m_game_id = volume->GetGameID();
|
||||
m_gametdb_id = volume->GetGameTDBID();
|
||||
m_triforce_id = volume->GetTriforceID();
|
||||
m_title_id = volume->GetTitleID().value_or(0);
|
||||
m_maker_id = volume->GetMakerID();
|
||||
m_revision = volume->GetRevision().value_or(0);
|
||||
@ -311,6 +312,7 @@ void GameFile::DoState(PointerWrap& p)
|
||||
p.Do(m_internal_name);
|
||||
p.Do(m_game_id);
|
||||
p.Do(m_gametdb_id);
|
||||
p.Do(m_triforce_id);
|
||||
p.Do(m_title_id);
|
||||
p.Do(m_maker_id);
|
||||
|
||||
@ -499,7 +501,8 @@ const std::string& GameFile::GetName(const Core::TitleDatabase& title_database)
|
||||
if (IsModDescriptor())
|
||||
return GetName(Variant::LongAndPossiblyCustom);
|
||||
|
||||
const std::string& database_name = title_database.GetTitleName(m_gametdb_id, GetConfigLanguage());
|
||||
const std::string& database_name =
|
||||
title_database.GetTitleName(m_gametdb_id, m_triforce_id, GetConfigLanguage());
|
||||
return database_name.empty() ? GetName(Variant::LongAndPossiblyCustom) : database_name;
|
||||
}
|
||||
|
||||
|
@ -76,6 +76,7 @@ public:
|
||||
const std::string& GetInternalName() const { return m_internal_name; }
|
||||
const std::string& GetGameID() const { return m_game_id; }
|
||||
const std::string& GetGameTDBID() const { return m_gametdb_id; }
|
||||
std::string GetTriforceID() const { return m_triforce_id; }
|
||||
u64 GetTitleID() const { return m_title_id; }
|
||||
const std::string& GetMakerID() const { return m_maker_id; }
|
||||
u16 GetRevision() const { return m_revision; }
|
||||
@ -159,6 +160,7 @@ private:
|
||||
std::string m_internal_name;
|
||||
std::string m_game_id;
|
||||
std::string m_gametdb_id;
|
||||
std::string m_triforce_id;
|
||||
u64 m_title_id{};
|
||||
std::string m_maker_id;
|
||||
|
||||
|
Reference in New Issue
Block a user