From aecf36276e2c7bbce49d69c467cd3992fec1dbcd Mon Sep 17 00:00:00 2001 From: TSR Berry <20988865+TSRBerry@users.noreply.github.com> Date: Tue, 16 Apr 2024 17:52:05 +0200 Subject: [PATCH] Rename Flush to Clear and remove unnecessary attribute --- src/Ryujinx.Gtk3/Input/GTK3/GTK3KeyboardDriver.cs | 2 +- src/Ryujinx.Input/HLE/NpadManager.cs | 2 +- src/Ryujinx.Input/IGamepadDriver.cs | 4 +--- src/Ryujinx/Input/AvaloniaKeyboard.cs | 2 +- src/Ryujinx/Input/AvaloniaKeyboardDriver.cs | 2 +- 5 files changed, 5 insertions(+), 7 deletions(-) diff --git a/src/Ryujinx.Gtk3/Input/GTK3/GTK3KeyboardDriver.cs b/src/Ryujinx.Gtk3/Input/GTK3/GTK3KeyboardDriver.cs index 1eaf430e11..bd71c7933f 100644 --- a/src/Ryujinx.Gtk3/Input/GTK3/GTK3KeyboardDriver.cs +++ b/src/Ryujinx.Gtk3/Input/GTK3/GTK3KeyboardDriver.cs @@ -81,7 +81,7 @@ namespace Ryujinx.Input.GTK3 return _pressedKeys.Contains(nativeKey); } - public void Flush() + public void Clear() { _pressedKeys.Clear(); } diff --git a/src/Ryujinx.Input/HLE/NpadManager.cs b/src/Ryujinx.Input/HLE/NpadManager.cs index 97f4a4c2ee..2409ecf22c 100644 --- a/src/Ryujinx.Input/HLE/NpadManager.cs +++ b/src/Ryujinx.Input/HLE/NpadManager.cs @@ -176,7 +176,7 @@ namespace Ryujinx.Input.HLE { foreach (InputConfig inputConfig in _inputConfig) { - _controllers[(int)inputConfig.PlayerIndex].GamepadDriver.Flush(); + _controllers[(int)inputConfig.PlayerIndex].GamepadDriver.Clear(); } _blockInputUpdates = false; diff --git a/src/Ryujinx.Input/IGamepadDriver.cs b/src/Ryujinx.Input/IGamepadDriver.cs index 83c6821d9c..ff4d36993c 100644 --- a/src/Ryujinx.Input/IGamepadDriver.cs +++ b/src/Ryujinx.Input/IGamepadDriver.cs @@ -1,5 +1,4 @@ using System; -using System.Runtime.CompilerServices; namespace Ryujinx.Input { @@ -39,7 +38,6 @@ namespace Ryujinx.Input /// Flush the internal state of the driver. /// /// Does nothing by default. - [MethodImpl(MethodImplOptions.AggressiveInlining)] - void Flush() { } + void Clear() { } } } diff --git a/src/Ryujinx/Input/AvaloniaKeyboard.cs b/src/Ryujinx/Input/AvaloniaKeyboard.cs index 42cc6a0ac4..ff88de79e4 100644 --- a/src/Ryujinx/Input/AvaloniaKeyboard.cs +++ b/src/Ryujinx/Input/AvaloniaKeyboard.cs @@ -195,7 +195,7 @@ namespace Ryujinx.Ava.Input public void Clear() { - _driver?.Flush(); + _driver?.Clear(); } public void Dispose() { } diff --git a/src/Ryujinx/Input/AvaloniaKeyboardDriver.cs b/src/Ryujinx/Input/AvaloniaKeyboardDriver.cs index 34b0b5d015..9f87e821ad 100644 --- a/src/Ryujinx/Input/AvaloniaKeyboardDriver.cs +++ b/src/Ryujinx/Input/AvaloniaKeyboardDriver.cs @@ -94,7 +94,7 @@ namespace Ryujinx.Ava.Input return _pressedKeys.Contains(nativeKey); } - public void Flush() + public void Clear() { _pressedKeys.Clear(); }