diff --git a/Source/Core/Core/IOS/ES/Formats.cpp b/Source/Core/Core/IOS/ES/Formats.cpp index b2990f0d40..44e648603f 100644 --- a/Source/Core/Core/IOS/ES/Formats.cpp +++ b/Source/Core/Core/IOS/ES/Formats.cpp @@ -298,7 +298,7 @@ DiscIO::Region TMDReader::GetRegion() const if (GetTitleId() == Titles::SYSTEM_MENU) return DiscIO::GetSysMenuRegion(GetTitleVersion()); - return DiscIO::RegionSwitchWii(static_cast(GetTitleId() & 0xff)); + return DiscIO::RegionSwitch(static_cast(GetTitleId() & 0xff), DiscIO::Platform::WiiWAD); } std::string TMDReader::GetGameID() const diff --git a/Source/Core/DiscIO/Enums.cpp b/Source/Core/DiscIO/Enums.cpp index 66dcdd19d6..5318ab6b78 100644 --- a/Source/Core/DiscIO/Enums.cpp +++ b/Source/Core/DiscIO/Enums.cpp @@ -145,13 +145,7 @@ Country TypicalCountryForRegion(Region region) } } -Region RegionSwitchGC(u8 country_code) -{ - Region region = RegionSwitchWii(country_code); - return region == Region::NTSC_K ? Region::NTSC_J : region; -} - -Region RegionSwitchWii(u8 country_code) +Region RegionSwitch(u8 country_code, Platform platform) { switch (country_code) { @@ -182,7 +176,7 @@ Region RegionSwitchWii(u8 country_code) case 'K': case 'Q': case 'T': - return Region::NTSC_K; + return platform == Platform::GameCubeDisc ? Region::NTSC_J : Region::NTSC_K; default: return Region::Unknown; diff --git a/Source/Core/DiscIO/Enums.h b/Source/Core/DiscIO/Enums.h index 524336651d..e7f8927971 100644 --- a/Source/Core/DiscIO/Enums.h +++ b/Source/Core/DiscIO/Enums.h @@ -77,9 +77,7 @@ bool IsNTSC(Region region); Country TypicalCountryForRegion(Region region); // Avoid using this function if you can. Country codes aren't always reliable region indicators. -Region RegionSwitchGC(u8 country_code); -// Avoid using this function if you can. Country codes aren't always reliable region indicators. -Region RegionSwitchWii(u8 country_code); +Region RegionSwitch(u8 country_code, Platform platform); Country CountrySwitch(u8 country_code); Region GetSysMenuRegion(u16 title_version); diff --git a/Source/Core/DiscIO/VolumeGC.cpp b/Source/Core/DiscIO/VolumeGC.cpp index f844d329c8..71506e8393 100644 --- a/Source/Core/DiscIO/VolumeGC.cpp +++ b/Source/Core/DiscIO/VolumeGC.cpp @@ -95,7 +95,7 @@ Country VolumeGC::GetCountry(const Partition& partition) const if (region == Region::NTSC_J && (country == 'E' || country == 'K' || country == 'W')) return Country::Korea; - if (RegionSwitchGC(country) != region) + if (RegionSwitch(country, Platform::GameCubeDisc) != region) return TypicalCountryForRegion(region); return CountrySwitch(country); diff --git a/Source/Core/DiscIO/VolumeWii.cpp b/Source/Core/DiscIO/VolumeWii.cpp index 73e5b290b7..3cb5cf42c0 100644 --- a/Source/Core/DiscIO/VolumeWii.cpp +++ b/Source/Core/DiscIO/VolumeWii.cpp @@ -290,10 +290,10 @@ Region VolumeWii::GetRegion() const Country VolumeWii::GetCountry(const Partition& partition) const { // The 0 that we use as a default value is mapped to Country::Unknown and Region::Unknown - u8 country_byte = ReadSwapped(3, partition).value_or(0); + const u8 country_byte = ReadSwapped(3, partition).value_or(0); const Region region = GetRegion(); - if (RegionSwitchWii(country_byte) != region) + if (RegionSwitch(country_byte, Platform::WiiDisc) != region) return TypicalCountryForRegion(region); return CountrySwitch(country_byte);