Fix Preview Plugins

This commit is contained in:
Isaac Marovitz 2024-02-09 12:40:29 -05:00
parent 18909195d1
commit 474a557e01
No known key found for this signature in database
GPG key ID: 97250B2B09A132E1
2 changed files with 10 additions and 10 deletions

View file

@ -46,6 +46,10 @@ namespace Ryujinx.Ava
ConfigurationState.Instance.UI.CustomThemePath.Event += ThemeChanged_Event; ConfigurationState.Instance.UI.CustomThemePath.Event += ThemeChanged_Event;
ConfigurationState.Instance.UI.EnableCustomTheme.Event += CustomThemeChanged_Event; ConfigurationState.Instance.UI.EnableCustomTheme.Event += CustomThemeChanged_Event;
} }
else
{
ConfigurationState.Initialize();
}
} }
private void CustomThemeChanged_Event(object sender, ReactiveEventArgs<bool> e) private void CustomThemeChanged_Event(object sender, ReactiveEventArgs<bool> e)

View file

@ -35,18 +35,14 @@ namespace Ryujinx.Ava.Common.Locale
// Load the system Language Code. // Load the system Language Code.
string localeLanguageCode = CultureInfo.CurrentCulture.Name.Replace('-', '_'); string localeLanguageCode = CultureInfo.CurrentCulture.Name.Replace('-', '_');
// If the view is loaded with the UI Previewer detached, then override it with the saved one or default. if (!string.IsNullOrEmpty(ConfigurationState.Instance.Ui.LanguageCode.Value))
if (Program.PreviewerDetached)
{ {
if (!string.IsNullOrEmpty(ConfigurationState.Instance.UI.LanguageCode.Value)) localeLanguageCode = ConfigurationState.Instance.Ui.LanguageCode.Value;
{
localeLanguageCode = ConfigurationState.Instance.UI.LanguageCode.Value;
} }
else else
{ {
localeLanguageCode = DefaultLanguageCode; localeLanguageCode = DefaultLanguageCode;
} }
}
// Load en_US as default, if the target language translation is incomplete. // Load en_US as default, if the target language translation is incomplete.
LoadDefaultLanguage(); LoadDefaultLanguage();