DiscIO: Make Korean GC checks in Enums.cpp less fragile

This commit is contained in:
JosJuice
2019-03-22 20:47:05 +01:00
parent c028a84531
commit c885fed9da
6 changed files with 60 additions and 26 deletions

View File

@ -97,11 +97,12 @@ Country VolumeGC::GetCountry(const Partition& partition) const
// The 0 that we use as a default value is mapped to Country::Unknown and Region::Unknown
const u8 country = ReadSwapped<u8>(3, partition).value_or(0);
const Region region = GetRegion();
const std::optional<u16> revision = GetRevision();
if (CountryCodeToRegion(country, Platform::GameCubeDisc, region) != region)
if (CountryCodeToRegion(country, Platform::GameCubeDisc, region, revision) != region)
return TypicalCountryForRegion(region);
return CountryCodeToCountry(country, Platform::GameCubeDisc, region);
return CountryCodeToCountry(country, Platform::GameCubeDisc, region, revision);
}
std::string VolumeGC::GetMakerID(const Partition& partition) const