Exemplo n.º 1
0
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();

  if (CountryCodeToRegion(country, Platform::GameCubeDisc, region) != region)
    return TypicalCountryForRegion(region);

  return CountryCodeToCountry(country, Platform::GameCubeDisc, region);
}
Exemplo n.º 2
0
Country VolumeWAD::GetCountry(const Partition& partition) const
{
  if (!m_tmd.IsValid())
    return Country::COUNTRY_UNKNOWN;

  u8 country_code = static_cast<u8>(m_tmd.GetTitleId() & 0xff);
  if (country_code == 2)  // SYSMENU
    return TypicalCountryForRegion(GetSysMenuRegion(m_tmd.GetTitleVersion()));

  return CountrySwitch(country_code);
}