Revert "Ava UI: Input Menu Refactor (#4998)"

This reverts commit 49b37550ca.

This currently breaks the GTK GUI.
This commit is contained in:
TSR Berry 2023-10-21 15:19:21 +02:00
parent 49b37550ca
commit 638be5f296
No known key found for this signature in database
GPG key ID: 52353C0A4CCA15E2
30 changed files with 1152 additions and 2916 deletions

View file

@ -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 : "";
}
}
}