mirror of
https://github.com/dolphin-emu/dolphin.git
synced 2025-07-29 12:19:12 +00:00
DiscIO: Add GetRegion function and Region enum
Instead of needing different switch cases for converting countries to regions in multiple places, we now only need a single country-to-region switch case (in DiscIO/Enums.cpp), and we get a nice Region type.
This commit is contained in:
parent
6aef0630f7
commit
66ea9f5cc1
26 changed files with 218 additions and 158 deletions
|
@ -311,12 +311,12 @@ std::vector<u8> CNANDContentLoader::GetKeyFromTicket(const std::vector<u8>& tick
|
|||
return AESDecode(common_key, iv, &ticket[0x01BF], 16);
|
||||
}
|
||||
|
||||
DiscIO::Country CNANDContentLoader::GetCountry() const
|
||||
DiscIO::Region CNANDContentLoader::GetRegion() const
|
||||
{
|
||||
if (!IsValid())
|
||||
return DiscIO::Country::COUNTRY_UNKNOWN;
|
||||
return DiscIO::Region::UNKNOWN_REGION;
|
||||
|
||||
return CountrySwitch(m_Country);
|
||||
return RegionSwitchWii(m_Country);
|
||||
}
|
||||
|
||||
CNANDContentManager::~CNANDContentManager()
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue