mirror of
https://github.com/dolphin-emu/dolphin.git
synced 2025-07-24 06:39: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:
@ -155,6 +155,7 @@ bool GameFile::TryLoadVolume()
|
||||
m_descriptions = ConvertLanguageMap(volume->GetDescriptions());
|
||||
m_disc_number = volume->GetDiscNumber();
|
||||
m_platform = volume->GetVolumeType();
|
||||
m_region = volume->GetRegion();
|
||||
m_country = volume->GetCountry();
|
||||
m_blob_type = volume->GetBlobType();
|
||||
m_raw_size = volume->GetRawSize();
|
||||
@ -174,6 +175,7 @@ bool GameFile::TryLoadElfDol()
|
||||
m_revision = 0;
|
||||
m_long_names[DiscIO::Language::LANGUAGE_ENGLISH] = m_file_name;
|
||||
m_platform = DiscIO::Platform::ELF_DOL;
|
||||
m_region = DiscIO::Region::UNKNOWN_REGION;
|
||||
m_country = DiscIO::Country::COUNTRY_UNKNOWN;
|
||||
m_blob_type = DiscIO::BlobType::DIRECTORY;
|
||||
m_raw_size = m_size;
|
||||
|
@ -16,6 +16,7 @@ namespace DiscIO
|
||||
enum class BlobType;
|
||||
enum class Country;
|
||||
enum class Language;
|
||||
enum class Region;
|
||||
enum class Platform;
|
||||
class IVolume;
|
||||
}
|
||||
@ -47,6 +48,7 @@ public:
|
||||
QString GetApploaderDate() const { return m_apploader_date; }
|
||||
DiscIO::Platform GetPlatformID() const { return m_platform; }
|
||||
QString GetPlatform() const;
|
||||
DiscIO::Region GetRegion() const { return m_region; }
|
||||
DiscIO::Country GetCountryID() const { return m_country; }
|
||||
QString GetCountry() const;
|
||||
DiscIO::BlobType GetBlobType() const { return m_blob_type; }
|
||||
@ -96,6 +98,7 @@ private:
|
||||
QMap<DiscIO::Language, QString> m_descriptions;
|
||||
QString m_company;
|
||||
u8 m_disc_number = 0;
|
||||
DiscIO::Region m_region;
|
||||
DiscIO::Platform m_platform;
|
||||
DiscIO::Country m_country;
|
||||
DiscIO::BlobType m_blob_type;
|
||||
|
Reference in New Issue
Block a user