From 8842a0f402ffe60a80ce7894bfd36afd039009fc Mon Sep 17 00:00:00 2001 From: JosJuice Date: Sat, 23 Feb 2019 17:49:06 +0100 Subject: Keep track of GameTDB ID separately from game ID The difference between Dolphin's game IDs and GameTDB's game IDs is that GameTDB uses four characters for non-disc titles, whereas Dolphin uses six characters for all titles. This fixes: - TitleDatabase considering Datel discs to be NHL Hitz 2002 - Gecko code downloading not working for discs with IDs starting with P - Cover downloading mixing up discs with channels (e.g. Mario Kart Wii and Mario Kart Channel) and making extra HTTP requests. (Android was actually doing a better job at this than DolphinQt!) --- Source/Core/DiscIO/VolumeGC.cpp | 11 +++++++++++ 1 file changed, 11 insertions(+) (limited to 'Source/Core/DiscIO/VolumeGC.cpp') diff --git a/Source/Core/DiscIO/VolumeGC.cpp b/Source/Core/DiscIO/VolumeGC.cpp index 1275fcfb78..e3db29c1f5 100644 --- a/Source/Core/DiscIO/VolumeGC.cpp +++ b/Source/Core/DiscIO/VolumeGC.cpp @@ -72,6 +72,17 @@ std::string VolumeGC::GetGameID(const Partition& partition) const return DecodeString(id); } +std::string VolumeGC::GetGameTDBID(const Partition& partition) const +{ + const std::string game_id = GetGameID(partition); + + // Don't return an ID for Datel discs that are using the game ID of NHL Hitz 2002 + if (game_id == "GNHE5d" && !GetBootDOLOffset(*this, partition).has_value()) + return ""; + + return game_id; +} + Region VolumeGC::GetRegion() const { const std::optional region_code = ReadSwapped(0x458, PARTITION_NONE); -- cgit v1.2.3