diff options
| author | Mat M <mathew1800@gmail.com> | 2019-10-23 20:15:31 -0400 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2019-10-23 20:15:31 -0400 |
| commit | 780d34dbca75ea85f7478f9a49fa20a97b14878b (patch) | |
| tree | 69cbdff19dceb7a1160eb248aa7ca255f4966097 /Source/Core/DiscIO/VolumeVerifier.cpp | |
| parent | d95745ffdb21941efa48af526fa4c9a591b826ed (diff) | |
| parent | 77b9a70d6c3f97076e84896519a242817a1a688c (diff) | |
Merge pull request #8426 from JosJuice/volumeverifier-region-mismatch
VolumeVerifier: Improve region/game ID mismatch checking
Diffstat (limited to 'Source/Core/DiscIO/VolumeVerifier.cpp')
| -rw-r--r-- | Source/Core/DiscIO/VolumeVerifier.cpp | 12 |
1 files changed, 9 insertions, 3 deletions
diff --git a/Source/Core/DiscIO/VolumeVerifier.cpp b/Source/Core/DiscIO/VolumeVerifier.cpp index fdc5c1d487..e62e40eff7 100644 --- a/Source/Core/DiscIO/VolumeVerifier.cpp +++ b/Source/Core/DiscIO/VolumeVerifier.cpp @@ -841,20 +841,26 @@ void VolumeVerifier::CheckMisc() } const Region region = m_volume.GetRegion(); - const Platform platform = m_volume.GetVolumeType(); + + constexpr std::string_view GAMECUBE_PLACEHOLDER_ID = "RELSAB"; + constexpr std::string_view WII_PLACEHOLDER_ID = "RABAZZ"; if (game_id_encrypted.size() < 4) { AddProblem(Severity::Low, Common::GetStringT("The game ID is unusually short.")); } - else + else if (game_id_encrypted != GAMECUBE_PLACEHOLDER_ID && game_id_encrypted != WII_PLACEHOLDER_ID) { char country_code; if (IsDisc(m_volume.GetVolumeType())) country_code = game_id_encrypted[3]; else country_code = static_cast<char>(m_volume.GetTitleID().value_or(0) & 0xff); - if (CountryCodeToRegion(country_code, platform, region) != region) + + const Platform platform = m_volume.GetVolumeType(); + const std::optional<u16> revision = m_volume.GetRevision(); + + if (CountryCodeToRegion(country_code, platform, region, revision) != region) { AddProblem(Severity::Medium, Common::GetStringT( |
