mirror of
https://github.com/dolphin-emu/dolphin.git
synced 2025-07-22 13:49:53 -06:00
Accurate region detection for NAND titles
This commit is contained in:
@ -84,11 +84,15 @@ Country VolumeWAD::GetCountry(const Partition& partition) const
|
||||
if (!m_tmd.IsValid())
|
||||
return Country::Unknown;
|
||||
|
||||
u8 country_code = static_cast<u8>(m_tmd.GetTitleId() & 0xff);
|
||||
if (country_code == 2) // SYSMENU
|
||||
const u8 country_byte = static_cast<u8>(m_tmd.GetTitleId() & 0xff);
|
||||
if (country_byte == 2) // SYSMENU
|
||||
return TypicalCountryForRegion(GetSysMenuRegion(m_tmd.GetTitleVersion()));
|
||||
|
||||
return CountryCodeToCountry(country_code, Platform::WiiWAD);
|
||||
const Region region = GetRegion();
|
||||
if (CountryCodeToRegion(country_byte, Platform::WiiWAD, region) != region)
|
||||
return TypicalCountryForRegion(region);
|
||||
|
||||
return CountryCodeToCountry(country_byte, Platform::WiiWAD, region);
|
||||
}
|
||||
|
||||
const IOS::ES::TMDReader& VolumeWAD::GetTMD(const Partition& partition) const
|
||||
|
Reference in New Issue
Block a user