diff options
Diffstat (limited to 'Ryujinx/Configuration/ConfigurationState.cs')
-rw-r--r-- | Ryujinx/Configuration/ConfigurationState.cs | 24 |
1 files changed, 22 insertions, 2 deletions
diff --git a/Ryujinx/Configuration/ConfigurationState.cs b/Ryujinx/Configuration/ConfigurationState.cs index 0b495ab7..1200fb52 100644 --- a/Ryujinx/Configuration/ConfigurationState.cs +++ b/Ryujinx/Configuration/ConfigurationState.cs @@ -6,6 +6,7 @@ using Ryujinx.Common.Configuration.Hid.Keyboard; using Ryujinx.Common.Logging; using Ryujinx.Configuration.System; using Ryujinx.Configuration.Ui; +using Ryujinx.Ui.Helper; using System; using System.Collections.Generic; @@ -88,6 +89,11 @@ namespace Ryujinx.Configuration /// </summary> public ReactiveObject<bool> StartFullscreen { get; private set; } + /// <summary> + /// Hide / Show Console Window + /// </summary> + public ReactiveObject<bool> ShowConsole { get; private set; } + public UiSection() { GuiColumns = new Columns(); @@ -96,6 +102,8 @@ namespace Ryujinx.Configuration EnableCustomTheme = new ReactiveObject<bool>(); CustomThemePath = new ReactiveObject<string>(); StartFullscreen = new ReactiveObject<bool>(); + ShowConsole = new ReactiveObject<bool>(); + ShowConsole.Event += static (s, e) => { ConsoleHelper.SetConsoleWindowState(e.NewValue); }; } } @@ -508,6 +516,7 @@ namespace Ryujinx.Configuration EnableCustomTheme = Ui.EnableCustomTheme, CustomThemePath = Ui.CustomThemePath, StartFullscreen = Ui.StartFullscreen, + ShowConsole = Ui.ShowConsole, EnableKeyboard = Hid.EnableKeyboard, EnableMouse = Hid.EnableMouse, Hotkeys = Hid.Hotkeys, @@ -574,6 +583,7 @@ namespace Ryujinx.Configuration Ui.EnableCustomTheme.Value = false; Ui.CustomThemePath.Value = ""; Ui.StartFullscreen.Value = false; + Ui.ShowConsole.Value = true; Hid.EnableKeyboard.Value = false; Hid.EnableMouse.Value = false; Hid.Hotkeys.Value = new KeyboardHotkeys @@ -995,7 +1005,7 @@ namespace Ryujinx.Configuration controllerConfig.RangeRight = 1.0f; } } - + configurationFileUpdated = true; } @@ -1007,7 +1017,16 @@ namespace Ryujinx.Configuration configurationFileUpdated = true; } - + + if (configurationFileFormat.Version < 37) + { + Common.Logging.Logger.Warning?.Print(LogClass.Application, $"Outdated configuration version {configurationFileFormat.Version}, migrating to version 37."); + + configurationFileFormat.ShowConsole = true; + + configurationFileUpdated = true; + } + Logger.EnableFileLog.Value = configurationFileFormat.EnableFileLog; Graphics.BackendThreading.Value = configurationFileFormat.BackendThreading; Graphics.ResScale.Value = configurationFileFormat.ResScale; @@ -1061,6 +1080,7 @@ namespace Ryujinx.Configuration Ui.EnableCustomTheme.Value = configurationFileFormat.EnableCustomTheme; Ui.CustomThemePath.Value = configurationFileFormat.CustomThemePath; Ui.StartFullscreen.Value = configurationFileFormat.StartFullscreen; + Ui.ShowConsole.Value = configurationFileFormat.ShowConsole; Hid.EnableKeyboard.Value = configurationFileFormat.EnableKeyboard; Hid.EnableMouse.Value = configurationFileFormat.EnableMouse; Hid.Hotkeys.Value = configurationFileFormat.Hotkeys; |