mirror of
https://github.com/dolphin-emu/dolphin.git
synced 2025-07-29 04:08:55 +00:00
DiscIO: Make Korean GC checks in Enums.cpp less fragile
This commit is contained in:
parent
c028a84531
commit
c885fed9da
6 changed files with 60 additions and 26 deletions
|
@ -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
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue