From 0ed909e782edb2aca6ca6531943fead46b846226 Mon Sep 17 00:00:00 2001 From: Steveice10 <1269164+Steveice10@users.noreply.github.com> Date: Wed, 29 Nov 2023 12:36:18 -0800 Subject: [PATCH] cfg: Fix auto-region detecting when the launched title has no regions. (#7218) --- src/core/hle/service/cfg/cfg.cpp | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/src/core/hle/service/cfg/cfg.cpp b/src/core/hle/service/cfg/cfg.cpp index 52b982043..e7b7c4476 100644 --- a/src/core/hle/service/cfg/cfg.cpp +++ b/src/core/hle/service/cfg/cfg.cpp @@ -661,6 +661,10 @@ void Module::UpdatePreferredRegionCode() { } const auto preferred_regions = system.GetAppLoader().GetPreferredRegions(); + if (preferred_regions.empty()) { + return; + } + const auto current_language = GetRawSystemLanguage(); const auto [region, adjusted_language] = AdjustLanguageInfoBlock(preferred_regions, current_language);