diff --git a/Source/Core/DiscIO/VolumeGC.cpp b/Source/Core/DiscIO/VolumeGC.cpp index 8e4a33d099..9ecb8bb266 100644 --- a/Source/Core/DiscIO/VolumeGC.cpp +++ b/Source/Core/DiscIO/VolumeGC.cpp @@ -74,13 +74,11 @@ std::string VolumeGC::GetGameID(const Partition& partition) const 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()) + // Don't return an ID for Datel discs + if (!GetBootDOLOffset(*this, PARTITION_NONE).has_value()) return ""; - return game_id; + return GetGameID(partition); } Region VolumeGC::GetRegion() const diff --git a/Source/Core/DiscIO/VolumeVerifier.cpp b/Source/Core/DiscIO/VolumeVerifier.cpp index 5250f88244..bad2790a4d 100644 --- a/Source/Core/DiscIO/VolumeVerifier.cpp +++ b/Source/Core/DiscIO/VolumeVerifier.cpp @@ -241,9 +241,9 @@ std::vector RedumpVerifier::ScanDatfile(const st continue; const std::string serials = game.child("serial").text().as_string(); - if (serials.empty()) + if (serials.empty() || StringBeginsWith(serials, "DS")) { - // This case is reached for Datel discs + // GC Datel discs have no serials in Redump, Wii Datel discs have serials like "DS000101" if (!m_game_id.empty()) continue; // Non-empty m_game_id means we're verifying a non-Datel disc } @@ -265,7 +265,7 @@ std::vector RedumpVerifier::ScanDatfile(const st const size_t game_id_start = first_dash == std::string::npos ? std::string::npos : first_dash + 1; - if (serial.size() < game_id_start + 4) + if (game_id_start == std::string::npos || serial.size() < game_id_start + 4) { ERROR_LOG(DISCIO, "Invalid serial in redump datfile: %s", serial_str.c_str()); continue; diff --git a/Source/Core/DiscIO/VolumeWii.cpp b/Source/Core/DiscIO/VolumeWii.cpp index 5b6524f807..bc39a7aae4 100644 --- a/Source/Core/DiscIO/VolumeWii.cpp +++ b/Source/Core/DiscIO/VolumeWii.cpp @@ -313,6 +313,10 @@ std::string VolumeWii::GetGameID(const Partition& partition) const std::string VolumeWii::GetGameTDBID(const Partition& partition) const { + // Don't return an ID for Datel discs + if (m_game_partition == PARTITION_NONE) + return ""; + return GetGameID(partition); }