From 34edcdd45461030c286a02661ee1faf5a4caf636 Mon Sep 17 00:00:00 2001 From: JosJuice Date: Sun, 30 Sep 2018 11:22:43 +0200 Subject: [PATCH] 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 --- Source/Core/Core/ConfigManager.cpp | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/Source/Core/Core/ConfigManager.cpp b/Source/Core/Core/ConfigManager.cpp index 5c048f910d2c..dc826fc15526 100644 --- a/Source/Core/Core/ConfigManager.cpp +++ b/Source/Core/Core/ConfigManager.cpp @@ -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;