diff options
author | TSRBerry <20988865+TSRBerry@users.noreply.github.com> | 2023-05-02 03:29:47 +0200 |
---|---|---|
committer | GitHub <noreply@github.com> | 2023-05-02 03:29:47 +0200 |
commit | dd574146fb5f05c1c0a469a4ad4a20c46bb37d74 (patch) | |
tree | 581cf26bcc2a5a31da00a66fd3255cfd489faced /src/Ryujinx.Headless.SDL2/SDL2MouseDriver.cs | |
parent | 2c94ac455ead867aac0a7a689a55d814a8bcc0da (diff) |
Add hide-cursor command line argument & always hide cursor option (#4613)1.1.743
* Add hide-cursor command line argument
* gtk: Adjust SettingsWindow for hide cursor options
* ava: Adjust SettingsWindow for hide cursor options
* ava: Add override check for HideCursor arg
* Remove copy&paste sins
* ava: Leave a little more room between the options
* gtk: Fix hide cursor issues
* ava: Only hide cursor if it's within the embedded window
Diffstat (limited to 'src/Ryujinx.Headless.SDL2/SDL2MouseDriver.cs')
-rw-r--r-- | src/Ryujinx.Headless.SDL2/SDL2MouseDriver.cs | 13 |
1 files changed, 7 insertions, 6 deletions
diff --git a/src/Ryujinx.Headless.SDL2/SDL2MouseDriver.cs b/src/Ryujinx.Headless.SDL2/SDL2MouseDriver.cs index 8c3412ff..7b88e265 100644 --- a/src/Ryujinx.Headless.SDL2/SDL2MouseDriver.cs +++ b/src/Ryujinx.Headless.SDL2/SDL2MouseDriver.cs @@ -1,4 +1,5 @@ -using Ryujinx.Input; +using Ryujinx.Common.Configuration; +using Ryujinx.Input; using System; using System.Diagnostics; using System.Drawing; @@ -13,7 +14,7 @@ namespace Ryujinx.Headless.SDL2 private const int CursorHideIdleTime = 5; // seconds private bool _isDisposed; - private HideCursor _hideCursor; + private HideCursorMode _hideCursorMode; private bool _isHidden; private long _lastCursorMoveTime; @@ -23,12 +24,12 @@ namespace Ryujinx.Headless.SDL2 public Vector2 Scroll { get; private set; } public Size _clientSize; - public SDL2MouseDriver(HideCursor hideCursor) + public SDL2MouseDriver(HideCursorMode hideCursorMode) { PressedButtons = new bool[(int)MouseButton.Count]; - _hideCursor = hideCursor; + _hideCursorMode = hideCursorMode; - if (_hideCursor == HideCursor.Always) + if (_hideCursorMode == HideCursorMode.Always) { SDL_ShowCursor(SDL_DISABLE); _isHidden = true; @@ -59,7 +60,7 @@ namespace Ryujinx.Headless.SDL2 private void CheckIdle() { - if (_hideCursor != HideCursor.OnIdle) + if (_hideCursorMode != HideCursorMode.OnIdle) { return; } |