From 7749e8c10c65dfb7c8f31d0e3793bcc143ea9c14 Mon Sep 17 00:00:00 2001 From: JosJuice Date: Wed, 16 Sep 2020 12:44:32 +0200 Subject: [PATCH] Only automatically override SYSCONF settings when it has an effect Any call to Config::SetCurrent will cause the relevant setting to show up as overridden in the Android GUI, which can be confusing, so let's not do it when the new value is the same as the original. --- Source/Core/Core/BootManager.cpp | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/Source/Core/Core/BootManager.cpp b/Source/Core/Core/BootManager.cpp index 23de16583b..20925f8685 100644 --- a/Source/Core/Core/BootManager.cpp +++ b/Source/Core/Core/BootManager.cpp @@ -401,7 +401,8 @@ bool BootCore(std::unique_ptr boot, const WindowSystemInfo& wsi) { const u32 wii_language = static_cast(StartUp.GetLanguageAdjustedForRegion(true, StartUp.m_region)); - Config::SetCurrent(Config::SYSCONF_LANGUAGE, wii_language); + if (wii_language != Config::Get(Config::SYSCONF_LANGUAGE)) + Config::SetCurrent(Config::SYSCONF_LANGUAGE, wii_language); const u8 country_code = static_cast(Config::Get(Config::SYSCONF_COUNTRY)); if (StartUp.m_region != DiscIO::SysConfCountryToRegion(country_code)) @@ -429,7 +430,7 @@ bool BootCore(std::unique_ptr boot, const WindowSystemInfo& wsi) // Some NTSC Wii games such as Doc Louis's Punch-Out!! and // 1942 (Virtual Console) crash if the PAL60 option is enabled - if (StartUp.bWii && DiscIO::IsNTSC(StartUp.m_region)) + if (StartUp.bWii && DiscIO::IsNTSC(StartUp.m_region) && Config::Get(Config::SYSCONF_PAL60)) Config::SetCurrent(Config::SYSCONF_PAL60, false); // Ensure any new settings are written to the SYSCONF