diff options
author | merry <git@mary.rs> | 2022-03-15 01:35:41 +0000 |
---|---|---|
committer | GitHub <noreply@github.com> | 2022-03-15 02:35:41 +0100 |
commit | 223172ac0babc7dc272a5489ac2e91062a12a0c2 (patch) | |
tree | 86fb90cac1258ab769e5822d0f530f38e401160b /Ryujinx/Ui/MainWindow.cs | |
parent | 8c9633d72fbe49ff022d907a7fdd813be95f176e (diff) |
Ui: Add option to show/hide console window (Windows-only) (#3170)1.1.72
* Ui: Add option to show/hide console window (Windows-only)
* Ui: Only display Show Console menu item on Windows
* ConsoleHelper: Handle NULL case
This will never happen
* Address nits
* Address comments
* Address comments 2
Diffstat (limited to 'Ryujinx/Ui/MainWindow.cs')
-rw-r--r-- | Ryujinx/Ui/MainWindow.cs | 11 |
1 files changed, 11 insertions, 0 deletions
diff --git a/Ryujinx/Ui/MainWindow.cs b/Ryujinx/Ui/MainWindow.cs index 5ab3cf61..32e66ee4 100644 --- a/Ryujinx/Ui/MainWindow.cs +++ b/Ryujinx/Ui/MainWindow.cs @@ -107,6 +107,7 @@ namespace Ryujinx.Ui [GUI] MenuItem _hideUi; [GUI] MenuItem _fullScreen; [GUI] CheckMenuItem _startFullScreen; + [GUI] CheckMenuItem _showConsole; [GUI] CheckMenuItem _favToggle; [GUI] MenuItem _firmwareInstallDirectory; [GUI] MenuItem _firmwareInstallFile; @@ -213,6 +214,9 @@ namespace Ryujinx.Ui _startFullScreen.Active = true; } + _showConsole.Active = ConfigurationState.Instance.Ui.ShowConsole.Value; + _showConsole.Visible = ConsoleHelper.SetConsoleWindowStateSupported; + _actionMenu.Sensitive = false; _pauseEmulation.Sensitive = false; _resumeEmulation.Sensitive = false; @@ -1535,6 +1539,13 @@ namespace Ryujinx.Ui SaveConfig(); } + private void ShowConsole_Toggled(object sender, EventArgs args) + { + ConfigurationState.Instance.Ui.ShowConsole.Value = _showConsole.Active; + + SaveConfig(); + } + private void OptionMenu_StateChanged(object o, StateChangedArgs args) { _manageUserProfiles.Sensitive = _emulationContext == null; |