From 124e426ab526f4d7ebc9e37b3db94b82a44bc000 Mon Sep 17 00:00:00 2001 From: Christopher Merrill <47538097+Revan20911@users.noreply.github.com> Date: Sat, 15 Apr 2023 12:15:58 -0500 Subject: [PATCH] Update ConfigurationState.cs --- .../Configuration/ConfigurationState.cs | 34 ++++++++++++++++++- 1 file changed, 33 insertions(+), 1 deletion(-) diff --git a/Ryujinx.Ui.Common/Configuration/ConfigurationState.cs b/Ryujinx.Ui.Common/Configuration/ConfigurationState.cs index 82a331c16..67612d880 100644 --- a/Ryujinx.Ui.Common/Configuration/ConfigurationState.cs +++ b/Ryujinx.Ui.Common/Configuration/ConfigurationState.cs @@ -115,6 +115,25 @@ namespace Ryujinx.Ui.Common.Configuration /// public ReactiveObject ShowNames { get; private set; } + public ReactiveObject WindowSizeWidth { get; private set; } + + /// + /// Height of the main window in pixels. + /// + public ReactiveObject WindowSizeHeight { get; private set; } + + /// + /// Horizontal position of the main window in pixels. + /// + public ReactiveObject WindowPositionX { get; private set; } + + /// + /// Vertical position of the main window in pixels. + /// + public ReactiveObject WindowPositionY { get; private set; } + + public ReactiveObject WindowMaximized {get; private set;} + /// /// Sets App Icon Size in Grid Mode /// @@ -146,6 +165,11 @@ namespace Ryujinx.Ui.Common.Configuration IsAscendingOrder = new ReactiveObject(); LanguageCode = new ReactiveObject(); ShowConsole = new ReactiveObject(); + WindowSizeWidth = new ReactiveObject(); + WindowSizeHeight = new ReactiveObject(); + WindowPositionX = new ReactiveObject(); + WindowPositionY = new ReactiveObject(); + WindowMaximized = new ReactiveObject(); ShowConsole.Event += static (s, e) => { ConsoleHelper.SetConsoleWindowState(e.NewValue); }; } } @@ -629,6 +653,11 @@ namespace Ryujinx.Ui.Common.Configuration IsAscendingOrder = Ui.IsAscendingOrder, StartFullscreen = Ui.StartFullscreen, ShowConsole = Ui.ShowConsole, + WindowSizeWidth = Ui.WindowSizeWidth, + WindowSizeHeight = Ui.WindowSizeHeight, + WindowPositionX = Ui.WindowPositionX, + WindowPositionY = Ui.WindowPositionY, + WindowMaximized = Ui.WindowMaximized, EnableKeyboard = Hid.EnableKeyboard, EnableMouse = Hid.EnableMouse, Hotkeys = Hid.Hotkeys, @@ -707,6 +736,9 @@ namespace Ryujinx.Ui.Common.Configuration Ui.CustomThemePath.Value = ""; Ui.BaseStyle.Value = "Dark"; Ui.GameListViewMode.Value = 0; + Ui.WindowSizeWidth.Value = 1280; + Ui.WindowSizeHeight.Value = 760; + Ui.WindowMaximized.Value = false; Ui.ShowNames.Value = true; Ui.GridSize.Value = 2; Ui.ApplicationSort.Value = 0; @@ -1351,4 +1383,4 @@ namespace Ryujinx.Ui.Common.Configuration Instance = new ConfigurationState(); } } -} \ No newline at end of file +}