From 4788ab04ce8faf3f156dc34be22ee662a080f578 Mon Sep 17 00:00:00 2001 From: Emmanuel Hansen Date: Tue, 15 Feb 2022 14:46:57 +0000 Subject: [PATCH] don't load locale from config if on previewer --- Ryujinx.Ava/Common/Locale/LocaleManager.cs | 14 ++++++++++---- 1 file changed, 10 insertions(+), 4 deletions(-) diff --git a/Ryujinx.Ava/Common/Locale/LocaleManager.cs b/Ryujinx.Ava/Common/Locale/LocaleManager.cs index d001a195470a..10cb41744934 100644 --- a/Ryujinx.Ava/Common/Locale/LocaleManager.cs +++ b/Ryujinx.Ava/Common/Locale/LocaleManager.cs @@ -30,9 +30,12 @@ public void Load() { string localeLanguageCode = CultureInfo.CurrentCulture.Name.Replace('-', '_'); - if (!string.IsNullOrEmpty(ConfigurationState.Instance.Ui.LanguageCode.Value)) + if (Program.PreviewerDetached) { - localeLanguageCode = ConfigurationState.Instance.Ui.LanguageCode.Value; + if (!string.IsNullOrEmpty(ConfigurationState.Instance.Ui.LanguageCode.Value)) + { + localeLanguageCode = ConfigurationState.Instance.Ui.LanguageCode.Value; + } } // Load english first, if the target language translation is incomplete, we default to english. @@ -101,8 +104,11 @@ public void LoadLanguage(string languageCode) this[item.Key] = item.Value; } - ConfigurationState.Instance.Ui.LanguageCode.Value = languageCode; - ConfigurationState.Instance.ToFileFormat().SaveConfig(Program.ConfigurationPath); + if (Program.PreviewerDetached) + { + ConfigurationState.Instance.Ui.LanguageCode.Value = languageCode; + ConfigurationState.Instance.ToFileFormat().SaveConfig(Program.ConfigurationPath); + } } } } \ No newline at end of file