mirror of
https://github.com/dolphin-emu/dolphin.git
synced 2025-07-23 14:19:46 -06: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:
@ -166,6 +166,14 @@ void CVolumeDirectory::SetGameID(const std::string& id)
|
||||
memcpy(m_disk_header.data(), id.c_str(), std::min(id.length(), MAX_ID_LENGTH));
|
||||
}
|
||||
|
||||
Region CVolumeDirectory::GetRegion() const
|
||||
{
|
||||
if (m_is_wii)
|
||||
return RegionSwitchWii(m_disk_header[3]);
|
||||
|
||||
return RegionSwitchGC(m_disk_header[3]);
|
||||
}
|
||||
|
||||
Country CVolumeDirectory::GetCountry() const
|
||||
{
|
||||
return CountrySwitch(m_disk_header[3]);
|
||||
|
Reference in New Issue
Block a user