diff options
Diffstat (limited to 'src/Ryujinx.Headless.SDL2')
-rw-r--r-- | src/Ryujinx.Headless.SDL2/HideCursor.cs | 9 | ||||
-rw-r--r-- | src/Ryujinx.Headless.SDL2/OpenGL/OpenGLWindow.cs | 4 | ||||
-rw-r--r-- | src/Ryujinx.Headless.SDL2/Options.cs | 4 | ||||
-rw-r--r-- | src/Ryujinx.Headless.SDL2/Program.cs | 4 | ||||
-rw-r--r-- | src/Ryujinx.Headless.SDL2/SDL2MouseDriver.cs | 13 | ||||
-rw-r--r-- | src/Ryujinx.Headless.SDL2/Vulkan/VulkanWindow.cs | 4 | ||||
-rw-r--r-- | src/Ryujinx.Headless.SDL2/WindowBase.cs | 4 |
7 files changed, 17 insertions, 25 deletions
diff --git a/src/Ryujinx.Headless.SDL2/HideCursor.cs b/src/Ryujinx.Headless.SDL2/HideCursor.cs deleted file mode 100644 index 2dc0bd6a..00000000 --- a/src/Ryujinx.Headless.SDL2/HideCursor.cs +++ /dev/null @@ -1,9 +0,0 @@ -namespace Ryujinx.Headless.SDL2 -{ - public enum HideCursor - { - Never, - OnIdle, - Always - } -}
\ No newline at end of file diff --git a/src/Ryujinx.Headless.SDL2/OpenGL/OpenGLWindow.cs b/src/Ryujinx.Headless.SDL2/OpenGL/OpenGLWindow.cs index 69b0f42f..dc7d811b 100644 --- a/src/Ryujinx.Headless.SDL2/OpenGL/OpenGLWindow.cs +++ b/src/Ryujinx.Headless.SDL2/OpenGL/OpenGLWindow.cs @@ -107,8 +107,8 @@ namespace Ryujinx.Headless.SDL2.OpenGL GraphicsDebugLevel glLogLevel, AspectRatio aspectRatio, bool enableMouse, - HideCursor hideCursor) - : base(inputManager, glLogLevel, aspectRatio, enableMouse, hideCursor) + HideCursorMode hideCursorMode) + : base(inputManager, glLogLevel, aspectRatio, enableMouse, hideCursorMode) { _glLogLevel = glLogLevel; } diff --git a/src/Ryujinx.Headless.SDL2/Options.cs b/src/Ryujinx.Headless.SDL2/Options.cs index 982d0990..7dffa1b0 100644 --- a/src/Ryujinx.Headless.SDL2/Options.cs +++ b/src/Ryujinx.Headless.SDL2/Options.cs @@ -76,8 +76,8 @@ namespace Ryujinx.Headless.SDL2 [Option("enable-mouse", Required = false, Default = false, HelpText = "Enable or disable mouse support.")] public bool EnableMouse { get; set; } - [Option("hide-cursor", Required = false, Default = HideCursor.OnIdle, HelpText = "Change when the cursor gets hidden.")] - public HideCursor HideCursor { get; set; } + [Option("hide-cursor", Required = false, Default = HideCursorMode.OnIdle, HelpText = "Change when the cursor gets hidden.")] + public HideCursorMode HideCursorMode { get; set; } [Option("list-input-profiles", Required = false, HelpText = "List inputs profiles.")] public bool ListInputProfiles { get; set; } diff --git a/src/Ryujinx.Headless.SDL2/Program.cs b/src/Ryujinx.Headless.SDL2/Program.cs index b0bdb97f..453c470e 100644 --- a/src/Ryujinx.Headless.SDL2/Program.cs +++ b/src/Ryujinx.Headless.SDL2/Program.cs @@ -478,8 +478,8 @@ namespace Ryujinx.Headless.SDL2 private static WindowBase CreateWindow(Options options) { return options.GraphicsBackend == GraphicsBackend.Vulkan - ? new VulkanWindow(_inputManager, options.LoggingGraphicsDebugLevel, options.AspectRatio, options.EnableMouse, options.HideCursor) - : new OpenGLWindow(_inputManager, options.LoggingGraphicsDebugLevel, options.AspectRatio, options.EnableMouse, options.HideCursor); + ? new VulkanWindow(_inputManager, options.LoggingGraphicsDebugLevel, options.AspectRatio, options.EnableMouse, options.HideCursorMode) + : new OpenGLWindow(_inputManager, options.LoggingGraphicsDebugLevel, options.AspectRatio, options.EnableMouse, options.HideCursorMode); } private static IRenderer CreateRenderer(Options options, WindowBase window) 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; } diff --git a/src/Ryujinx.Headless.SDL2/Vulkan/VulkanWindow.cs b/src/Ryujinx.Headless.SDL2/Vulkan/VulkanWindow.cs index 172b7685..5d048da1 100644 --- a/src/Ryujinx.Headless.SDL2/Vulkan/VulkanWindow.cs +++ b/src/Ryujinx.Headless.SDL2/Vulkan/VulkanWindow.cs @@ -17,8 +17,8 @@ namespace Ryujinx.Headless.SDL2.Vulkan GraphicsDebugLevel glLogLevel, AspectRatio aspectRatio, bool enableMouse, - HideCursor hideCursor) - : base(inputManager, glLogLevel, aspectRatio, enableMouse, hideCursor) + HideCursorMode hideCursorMode) + : base(inputManager, glLogLevel, aspectRatio, enableMouse, hideCursorMode) { _glLogLevel = glLogLevel; } diff --git a/src/Ryujinx.Headless.SDL2/WindowBase.cs b/src/Ryujinx.Headless.SDL2/WindowBase.cs index e3371042..7c310153 100644 --- a/src/Ryujinx.Headless.SDL2/WindowBase.cs +++ b/src/Ryujinx.Headless.SDL2/WindowBase.cs @@ -78,9 +78,9 @@ namespace Ryujinx.Headless.SDL2 GraphicsDebugLevel glLogLevel, AspectRatio aspectRatio, bool enableMouse, - HideCursor hideCursor) + HideCursorMode hideCursorMode) { - MouseDriver = new SDL2MouseDriver(hideCursor); + MouseDriver = new SDL2MouseDriver(hideCursorMode); _inputManager = inputManager; _inputManager.SetMouseDriver(MouseDriver); NpadManager = _inputManager.CreateNpadManager(); |