diff options
| author | JosJuice <josjuice@gmail.com> | 2016-12-23 18:41:21 +0100 |
|---|---|---|
| committer | JosJuice <josjuice@gmail.com> | 2017-01-02 20:57:11 +0100 |
| commit | 66ea9f5cc18ca6beb87ddd7f7a291d96669ad653 (patch) | |
| tree | 011a81833e2b2b5452b390ba4f58181ab77e8d66 /Source/Core/DolphinWX/ISOFile.cpp | |
| parent | 6aef0630f74e61d6847fc1f1186056df8bd42651 (diff) | |
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.
Diffstat (limited to 'Source/Core/DolphinWX/ISOFile.cpp')
| -rw-r--r-- | Source/Core/DolphinWX/ISOFile.cpp | 9 |
1 files changed, 6 insertions, 3 deletions
diff --git a/Source/Core/DolphinWX/ISOFile.cpp b/Source/Core/DolphinWX/ISOFile.cpp index e1ee632406..5a46458d81 100644 --- a/Source/Core/DolphinWX/ISOFile.cpp +++ b/Source/Core/DolphinWX/ISOFile.cpp @@ -36,7 +36,7 @@ #include "DolphinWX/ISOFile.h" #include "DolphinWX/WxUtils.h" -static const u32 CACHE_REVISION = 0x127; // Last changed in PR 3309 +static const u32 CACHE_REVISION = 0x128; // Last changed in PR 4542 static std::string GetLanguageString(DiscIO::Language language, std::map<DiscIO::Language, std::string> strings) @@ -64,8 +64,9 @@ static std::string GetLanguageString(DiscIO::Language language, GameListItem::GameListItem(const std::string& _rFileName, const std::unordered_map<std::string, std::string>& custom_titles) : m_FileName(_rFileName), m_title_id(0), m_emu_state(0), m_FileSize(0), - m_Country(DiscIO::Country::COUNTRY_UNKNOWN), m_Revision(0), m_Valid(false), m_ImageWidth(0), - m_ImageHeight(0), m_disc_number(0), m_has_custom_name(false) + m_region(DiscIO::Region::UNKNOWN_REGION), m_Country(DiscIO::Country::COUNTRY_UNKNOWN), + m_Revision(0), m_Valid(false), m_ImageWidth(0), m_ImageHeight(0), m_disc_number(0), + m_has_custom_name(false) { if (LoadFromCache()) { @@ -99,6 +100,7 @@ GameListItem::GameListItem(const std::string& _rFileName, if (m_company.empty()) m_company = GetLanguageString(DiscIO::Language::LANGUAGE_ENGLISH, volume->GetShortMakers()); + m_region = volume->GetRegion(); m_Country = volume->GetCountry(); m_blob_type = volume->GetBlobType(); m_FileSize = volume->GetRawSize(); @@ -214,6 +216,7 @@ void GameListItem::DoState(PointerWrap& p) p.Do(m_title_id); p.Do(m_FileSize); p.Do(m_VolumeSize); + p.Do(m_region); p.Do(m_Country); p.Do(m_blob_type); p.Do(m_pImage); |
