mirror of
https://github.com/dolphin-emu/dolphin.git
synced 2024-11-14 21:37:52 -07:00
DiscIO: Fix the 'W', 'X', 'Y' and 'Z' country codes
These country codes have the unfortunate property that they are used by Wii disc games in two different regions. We already correct for this in VolumeGC::GetCountry and VolumeWii::GetCountry, so this commit shouldn't really have any effect on how the game list behaves, but it will be useful if we in the future would want to call CountrySwitch directly without having extra code in the caller for handling region weirdness.
This commit is contained in:
parent
504024ab46
commit
cab5e52d15
@ -150,17 +150,23 @@ Region RegionSwitch(u8 country_code, Platform platform, Region expected_region)
|
||||
switch (country_code)
|
||||
{
|
||||
case 'J':
|
||||
case 'W':
|
||||
return Region::NTSC_J;
|
||||
|
||||
case 'W':
|
||||
return expected_region == Region::PAL ? Region::PAL : Region::NTSC_J;
|
||||
|
||||
case 'E':
|
||||
return expected_region == Region::NTSC_J ? Region::NTSC_J : Region::NTSC_U;
|
||||
|
||||
case 'B':
|
||||
case 'N':
|
||||
case 'Z':
|
||||
return Region::NTSC_U;
|
||||
|
||||
case 'X':
|
||||
case 'Y':
|
||||
case 'Z':
|
||||
return expected_region == Region::NTSC_U ? Region::NTSC_U : Region::PAL;
|
||||
|
||||
case 'D':
|
||||
case 'F':
|
||||
case 'H':
|
||||
@ -172,8 +178,6 @@ Region RegionSwitch(u8 country_code, Platform platform, Region expected_region)
|
||||
case 'S':
|
||||
case 'U':
|
||||
case 'V':
|
||||
case 'X':
|
||||
case 'Y':
|
||||
return Region::PAL;
|
||||
|
||||
case 'K':
|
||||
@ -194,12 +198,22 @@ Country CountrySwitch(u8 country_code, Platform platform, Region region)
|
||||
case 'A':
|
||||
return Country::World;
|
||||
|
||||
// Mixed regions
|
||||
case 'X':
|
||||
case 'Y':
|
||||
case 'Z':
|
||||
return region == Region::NTSC_U ? Country::USA : Country::Europe;
|
||||
|
||||
case 'W':
|
||||
if (region == Region::PAL)
|
||||
return Country::Europe;
|
||||
else
|
||||
return platform == Platform::GameCubeDisc ? Country::Korea : Country::Taiwan;
|
||||
|
||||
// PAL
|
||||
case 'D':
|
||||
return Country::Germany;
|
||||
|
||||
case 'X': // Used by a couple PAL games
|
||||
case 'Y': // German, French
|
||||
case 'L': // Japanese import to PAL regions
|
||||
case 'M': // Japanese import to PAL regions
|
||||
case 'V':
|
||||
@ -229,7 +243,6 @@ Country CountrySwitch(u8 country_code, Platform platform, Region region)
|
||||
return region == Region::NTSC_J ? Country::Korea : Country::USA;
|
||||
|
||||
case 'N': // Japanese import to USA and other NTSC regions
|
||||
case 'Z': // Prince of Persia - The Forgotten Sands (Wii)
|
||||
case 'B': // Ufouria: The Saga (Virtual Console)
|
||||
return Country::USA;
|
||||
|
||||
@ -241,9 +254,6 @@ Country CountrySwitch(u8 country_code, Platform platform, Region region)
|
||||
case 'T': // Korea with English language
|
||||
return Country::Korea;
|
||||
|
||||
case 'W':
|
||||
return platform == Platform::GameCubeDisc ? Country::Korea : Country::Taiwan;
|
||||
|
||||
default:
|
||||
if (country_code > 'A') // Silently ignore IOS wads
|
||||
WARN_LOG(DISCIO, "Unknown Country Code! %c", country_code);
|
||||
|
Loading…
Reference in New Issue
Block a user