Never return Unknown from SConfig::GetFallbackRegion

This happens if Wii Menu 1.0 is installed.

Reported by https://forums.dolphin-emu.org/Thread-default-case-should-not-be-reached
This commit is contained in:
JosJuice 2018-09-30 11:22:43 +02:00
parent 61821b067f
commit 34edcdd454
1 changed files with 5 additions and 1 deletions

View File

@ -955,7 +955,11 @@ DiscIO::Region SConfig::GetFallbackRegion()
IOS::HLE::Kernel ios;
const IOS::ES::TMDReader system_menu_tmd = ios.GetES()->FindInstalledTMD(Titles::SYSTEM_MENU);
if (system_menu_tmd.IsValid())
return system_menu_tmd.GetRegion();
{
const DiscIO::Region region = system_menu_tmd.GetRegion();
if (region != DiscIO::Region::Unknown)
return region;
}
// Fall back to PAL.
return DiscIO::Region::PAL;