From 66ea9f5cc18ca6beb87ddd7f7a291d96669ad653 Mon Sep 17 00:00:00 2001 From: JosJuice Date: Fri, 23 Dec 2016 18:41:21 +0100 Subject: 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. --- Source/Core/DiscIO/NANDContentLoader.cpp | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'Source/Core/DiscIO/NANDContentLoader.cpp') diff --git a/Source/Core/DiscIO/NANDContentLoader.cpp b/Source/Core/DiscIO/NANDContentLoader.cpp index 5b3057efbf..2c5e0e87e7 100644 --- a/Source/Core/DiscIO/NANDContentLoader.cpp +++ b/Source/Core/DiscIO/NANDContentLoader.cpp @@ -311,12 +311,12 @@ std::vector CNANDContentLoader::GetKeyFromTicket(const std::vector& 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() -- cgit v1.2.3