diff options
author | emmauss <emmausssss@gmail.com> | 2021-06-24 00:09:08 +0000 |
---|---|---|
committer | GitHub <noreply@github.com> | 2021-06-24 02:09:08 +0200 |
commit | 77aab9aca302bbe635d94750f57fb9a1ad910b74 (patch) | |
tree | 67b37d83d194169a6b6a4a98914c761b8f7b8a77 /Ryujinx/Configuration/ConfigurationState.cs | |
parent | a10b2c5ff26886e9ffc6f19e3f0fe9505a503b2f (diff) |
Add Direct Mouse Support (#2374)
* and direct mouse support
* and direct mouse support
* hide cursor if mouse enabled
* add config
* update docs
* sorted usings
Diffstat (limited to 'Ryujinx/Configuration/ConfigurationState.cs')
-rw-r--r-- | Ryujinx/Configuration/ConfigurationState.cs | 18 |
1 files changed, 18 insertions, 0 deletions
diff --git a/Ryujinx/Configuration/ConfigurationState.cs b/Ryujinx/Configuration/ConfigurationState.cs index 11ec1373..1769dfa9 100644 --- a/Ryujinx/Configuration/ConfigurationState.cs +++ b/Ryujinx/Configuration/ConfigurationState.cs @@ -268,6 +268,11 @@ namespace Ryujinx.Configuration /// Enable or disable keyboard support (Independent from controllers binding) /// </summary> public ReactiveObject<bool> EnableKeyboard { get; private set; } + + /// <summary> + /// Enable or disable mouse support (Independent from controllers binding) + /// </summary> + public ReactiveObject<bool> EnableMouse { get; private set; } /// <summary> /// Hotkey Keyboard Bindings @@ -284,6 +289,7 @@ namespace Ryujinx.Configuration public HidSection() { EnableKeyboard = new ReactiveObject<bool>(); + EnableMouse = new ReactiveObject<bool>(); Hotkeys = new ReactiveObject<KeyboardHotkeys>(); InputConfig = new ReactiveObject<List<InputConfig>>(); } @@ -471,6 +477,7 @@ namespace Ryujinx.Configuration CustomThemePath = Ui.CustomThemePath, StartFullscreen = Ui.StartFullscreen, EnableKeyboard = Hid.EnableKeyboard, + EnableMouse = Hid.EnableMouse, Hotkeys = Hid.Hotkeys, KeyboardConfig = new List<object>(), ControllerConfig = new List<object>(), @@ -532,6 +539,7 @@ namespace Ryujinx.Configuration Ui.CustomThemePath.Value = ""; Ui.StartFullscreen.Value = false; Hid.EnableKeyboard.Value = false; + Hid.EnableMouse.Value = false; Hid.Hotkeys.Value = new KeyboardHotkeys { ToggleVsync = Key.Tab @@ -828,6 +836,15 @@ namespace Ryujinx.Configuration configurationFileUpdated = true; } + if (configurationFileFormat.Version < 27) + { + Common.Logging.Logger.Warning?.Print(LogClass.Application, $"Outdated configuration version {configurationFileFormat.Version}, migrating to version 27."); + + configurationFileFormat.EnableMouse = false; + + configurationFileUpdated = true; + } + Logger.EnableFileLog.Value = configurationFileFormat.EnableFileLog; Graphics.ResScale.Value = configurationFileFormat.ResScale; Graphics.ResScaleCustom.Value = configurationFileFormat.ResScaleCustom; @@ -878,6 +895,7 @@ namespace Ryujinx.Configuration Ui.CustomThemePath.Value = configurationFileFormat.CustomThemePath; Ui.StartFullscreen.Value = configurationFileFormat.StartFullscreen; Hid.EnableKeyboard.Value = configurationFileFormat.EnableKeyboard; + Hid.EnableMouse.Value = configurationFileFormat.EnableMouse; Hid.Hotkeys.Value = configurationFileFormat.Hotkeys; Hid.InputConfig.Value = configurationFileFormat.InputConfig; |