mirror of
https://github.com/dolphin-emu/dolphin.git
synced 2026-03-18 19:32:41 +00:00
elf dol id
This commit is contained in:
parent
15f24c56e4
commit
1394f9d16e
@ -130,6 +130,12 @@ const std::string SConfig::GetGameTDBID() const
|
||||
return m_gametdb_id;
|
||||
}
|
||||
|
||||
const std::string SConfig::GetGameIDElfDol() const
|
||||
{
|
||||
std::lock_guard<std::recursive_mutex> lock(m_metadata_lock);
|
||||
return m_game_id_elf_dol;
|
||||
}
|
||||
|
||||
const std::string SConfig::GetTitleName() const
|
||||
{
|
||||
std::lock_guard<std::recursive_mutex> lock(m_metadata_lock);
|
||||
@ -258,6 +264,13 @@ void SConfig::SetRunningGameMetadata(const std::string& game_id, const std::stri
|
||||
DolphinAnalytics::Instance().ReportGameStart();
|
||||
}
|
||||
|
||||
|
||||
void SConfig::SetElfDolID(const std::string& game_id)
|
||||
{
|
||||
std::lock_guard<std::recursive_mutex> lock(m_metadata_lock);
|
||||
m_game_id_elf_dol = game_id;
|
||||
}
|
||||
|
||||
void SConfig::OnESTitleChanged()
|
||||
{
|
||||
auto& system = Core::System::GetInstance();
|
||||
@ -357,7 +370,9 @@ struct SetGameMetadata
|
||||
constexpr char BACKSLASH = '\\';
|
||||
constexpr char FORWARDSLASH = '/';
|
||||
std::ranges::replace(executable_path, BACKSLASH, FORWARDSLASH);
|
||||
config->SetRunningGameMetadata(SConfig::MakeGameID(PathToFileName(executable_path)));
|
||||
std::string made_game_id = SConfig::MakeGameID(PathToFileName(executable_path));
|
||||
config->SetRunningGameMetadata(made_game_id);
|
||||
config->SetElfDolID(made_game_id);
|
||||
|
||||
Host_TitleChanged();
|
||||
|
||||
|
||||
@ -61,6 +61,7 @@ struct SConfig
|
||||
|
||||
const std::string GetGameID() const;
|
||||
const std::string GetGameTDBID() const;
|
||||
const std::string GetGameIDElfDol() const;
|
||||
const std::string GetTitleName() const;
|
||||
const std::string GetTitleDescription() const;
|
||||
u64 GetTitleID() const;
|
||||
@ -70,6 +71,8 @@ struct SConfig
|
||||
void SetRunningGameMetadata(const IOS::ES::TMDReader& tmd, DiscIO::Platform platform);
|
||||
void SetRunningGameMetadata(const std::string& game_id);
|
||||
|
||||
void SetElfDolID(const std::string& game_id);
|
||||
|
||||
// Triggered when Dolphin loads a title directly
|
||||
// Reloads title-specific map files, patches, etc.
|
||||
static void OnTitleDirectlyBooted(const Core::CPUThreadGuard& guard);
|
||||
@ -125,6 +128,7 @@ private:
|
||||
mutable std::recursive_mutex m_metadata_lock;
|
||||
|
||||
std::string m_game_id;
|
||||
std::string m_game_id_elf_dol;
|
||||
std::string m_gametdb_id;
|
||||
std::string m_title_name;
|
||||
std::string m_title_description;
|
||||
|
||||
@ -85,6 +85,9 @@ void HiresTexture::Update()
|
||||
}
|
||||
|
||||
const std::string& game_id = SConfig::GetInstance().GetGameID();
|
||||
const std::string& game_id_elf_dol = SConfig::GetInstance().GetGameIDElfDol();
|
||||
OSD::AddMessage(fmt::format("Game ID '{}' used to load textures", game_id), 10000);
|
||||
OSD::AddMessage(fmt::format("ELF/DOL Game ID '{}'", game_id_elf_dol), 10000);
|
||||
const std::set<std::string> texture_directories =
|
||||
GetTextureDirectoriesWithGameId(File::GetUserPath(D_HIRESTEXTURES_IDX), game_id);
|
||||
constexpr auto extensions = std::to_array<std::string_view>({".png", ".dds"});
|
||||
|
||||
Loading…
Reference in New Issue
Block a user