diff options
author | TSR Berry <20988865+TSRBerry@users.noreply.github.com> | 2023-10-21 15:19:21 +0200 |
---|---|---|
committer | TSR Berry <20988865+TSRBerry@users.noreply.github.com> | 2023-10-21 15:19:21 +0200 |
commit | 638be5f296bf52943da4366699d33f1e8656e00c (patch) | |
tree | 7c30a2d1fc44283846b67d98928e5f628222e3c6 /src/Ryujinx.Input/Assigner/KeyboardKeyAssigner.cs | |
parent | 49b37550cae6b3c69f59a9c7a44b17e3c12a813b (diff) |
Revert "Ava UI: Input Menu Refactor (#4998)"1.1.1059
This reverts commit 49b37550cae6b3c69f59a9c7a44b17e3c12a813b.
This currently breaks the GTK GUI.
Diffstat (limited to 'src/Ryujinx.Input/Assigner/KeyboardKeyAssigner.cs')
-rw-r--r-- | src/Ryujinx.Input/Assigner/KeyboardKeyAssigner.cs | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/src/Ryujinx.Input/Assigner/KeyboardKeyAssigner.cs b/src/Ryujinx.Input/Assigner/KeyboardKeyAssigner.cs index c66812ba..e52ef4a2 100644 --- a/src/Ryujinx.Input/Assigner/KeyboardKeyAssigner.cs +++ b/src/Ryujinx.Input/Assigner/KeyboardKeyAssigner.cs @@ -23,7 +23,7 @@ namespace Ryujinx.Input.Assigner public bool HasAnyButtonPressed() { - return GetPressedButton() is not null; + return GetPressedButton().Length != 0; } public bool ShouldCancel() @@ -31,20 +31,20 @@ namespace Ryujinx.Input.Assigner return _keyboardState.IsPressed(Key.Escape); } - public ButtonValue? GetPressedButton() + public string GetPressedButton() { - ButtonValue? keyPressed = null; + string keyPressed = ""; for (Key key = Key.Unknown; key < Key.Count; key++) { if (_keyboardState.IsPressed(key)) { - keyPressed = new(key); + keyPressed = key.ToString(); break; } } - return !ShouldCancel() ? keyPressed : null; + return !ShouldCancel() ? keyPressed : ""; } } } |