From 03d401127eb0e0bf3ad038ad22ab1511a66f901e Mon Sep 17 00:00:00 2001 From: JosJuice Date: Tue, 16 Oct 2018 21:37:49 +0200 Subject: [PATCH] Fix issue 11422 (inconsistent game ID for some hacked games) Starting with PR 7411, the rest of Dolphin reads the game ID from PARTITION_NONE, but SetRunningGameMetadata was still reading from the game partition. https://bugs.dolphin-emu.org/issues/11422 --- Source/Core/Core/ConfigManager.cpp | 14 +++++++++++--- 1 file changed, 11 insertions(+), 3 deletions(-) diff --git a/Source/Core/Core/ConfigManager.cpp b/Source/Core/Core/ConfigManager.cpp index 4de8b66eb8..5c048f910d 100644 --- a/Source/Core/Core/ConfigManager.cpp +++ b/Source/Core/Core/ConfigManager.cpp @@ -655,9 +655,17 @@ void SConfig::ResetRunningGameMetadata() void SConfig::SetRunningGameMetadata(const DiscIO::Volume& volume, const DiscIO::Partition& partition) { - SetRunningGameMetadata(volume.GetGameID(partition), volume.GetTitleID(partition).value_or(0), - volume.GetRevision(partition).value_or(0), - Core::TitleDatabase::TitleType::Other); + if (partition == volume.GetGamePartition()) + { + SetRunningGameMetadata(volume.GetGameID(), volume.GetTitleID().value_or(0), + volume.GetRevision().value_or(0), Core::TitleDatabase::TitleType::Other); + } + else + { + SetRunningGameMetadata(volume.GetGameID(partition), volume.GetTitleID(partition).value_or(0), + volume.GetRevision(partition).value_or(0), + Core::TitleDatabase::TitleType::Other); + } } void SConfig::SetRunningGameMetadata(const IOS::ES::TMDReader& tmd)