Merge pull request #8443 from JosJuice/redumpverifier-datel-wii
RedumpVerifier: Fix handling of Datel Wii disc serials
This commit is contained in:
commit
78fad0aafa
|
@ -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
|
||||
|
|
|
@ -241,9 +241,9 @@ std::vector<RedumpVerifier::PotentialMatch> 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::PotentialMatch> 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;
|
||||
|
|
|
@ -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);
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in New Issue