From 08d0b98988af1ff0991d660911b4a400980676d5 Mon Sep 17 00:00:00 2001 From: JosJuice Date: Fri, 5 Oct 2018 17:48:59 +0200 Subject: DiscIO: Merge RegionSwitchGC and RegionSwitchWii --- Source/Core/DiscIO/VolumeWii.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'Source/Core/DiscIO/VolumeWii.cpp') diff --git a/Source/Core/DiscIO/VolumeWii.cpp b/Source/Core/DiscIO/VolumeWii.cpp index 73e5b290b7..3cb5cf42c0 100644 --- a/Source/Core/DiscIO/VolumeWii.cpp +++ b/Source/Core/DiscIO/VolumeWii.cpp @@ -290,10 +290,10 @@ Region VolumeWii::GetRegion() const Country VolumeWii::GetCountry(const Partition& partition) const { // The 0 that we use as a default value is mapped to Country::Unknown and Region::Unknown - u8 country_byte = ReadSwapped(3, partition).value_or(0); + const u8 country_byte = ReadSwapped(3, partition).value_or(0); const Region region = GetRegion(); - if (RegionSwitchWii(country_byte) != region) + if (RegionSwitch(country_byte, Platform::WiiDisc) != region) return TypicalCountryForRegion(region); return CountrySwitch(country_byte); -- cgit v1.2.3 From 57d05293fd11748a7a533ad81a1b61e85e4daca6 Mon Sep 17 00:00:00 2001 From: JosJuice Date: Fri, 5 Oct 2018 20:14:23 +0200 Subject: DiscIO: Move the Korean GC mess out of VolumeGC --- Source/Core/DiscIO/VolumeWii.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'Source/Core/DiscIO/VolumeWii.cpp') diff --git a/Source/Core/DiscIO/VolumeWii.cpp b/Source/Core/DiscIO/VolumeWii.cpp index 3cb5cf42c0..c64dc3ec05 100644 --- a/Source/Core/DiscIO/VolumeWii.cpp +++ b/Source/Core/DiscIO/VolumeWii.cpp @@ -293,10 +293,10 @@ Country VolumeWii::GetCountry(const Partition& partition) const const u8 country_byte = ReadSwapped(3, partition).value_or(0); const Region region = GetRegion(); - if (RegionSwitch(country_byte, Platform::WiiDisc) != region) + if (RegionSwitch(country_byte, Platform::WiiDisc, region) != region) return TypicalCountryForRegion(region); - return CountrySwitch(country_byte); + return CountrySwitch(country_byte, Platform::WiiDisc, region); } std::string VolumeWii::GetMakerID(const Partition& partition) const -- cgit v1.2.3 From f834ef1dfede5b1f010314810845c97715eabae7 Mon Sep 17 00:00:00 2001 From: JosJuice Date: Mon, 8 Oct 2018 13:51:21 +0200 Subject: DiscIO: Rename RegionSwitch/CountrySwitch Callers don't need to know that these functions are implemented with a switch statement. --- Source/Core/DiscIO/VolumeWii.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'Source/Core/DiscIO/VolumeWii.cpp') diff --git a/Source/Core/DiscIO/VolumeWii.cpp b/Source/Core/DiscIO/VolumeWii.cpp index c64dc3ec05..29d822fca9 100644 --- a/Source/Core/DiscIO/VolumeWii.cpp +++ b/Source/Core/DiscIO/VolumeWii.cpp @@ -293,10 +293,10 @@ Country VolumeWii::GetCountry(const Partition& partition) const const u8 country_byte = ReadSwapped(3, partition).value_or(0); const Region region = GetRegion(); - if (RegionSwitch(country_byte, Platform::WiiDisc, region) != region) + if (CountryCodeToRegion(country_byte, Platform::WiiDisc, region) != region) return TypicalCountryForRegion(region); - return CountrySwitch(country_byte, Platform::WiiDisc, region); + return CountryCodeToCountry(country_byte, Platform::WiiDisc, region); } std::string VolumeWii::GetMakerID(const Partition& partition) const -- cgit v1.2.3