misc: chore: Use collection expressions in Avalonia project
This commit is contained in:
@@ -11,7 +11,7 @@ namespace Ryujinx.Ava.Input
|
||||
{
|
||||
internal class AvaloniaKeyboardDriver : IGamepadDriver
|
||||
{
|
||||
private static readonly string[] _keyboardIdentifers = new string[1] { "0" };
|
||||
private static readonly string[] _keyboardIdentifers = ["0"];
|
||||
private readonly Control _control;
|
||||
private readonly HashSet<AvaKey> _pressedKeys;
|
||||
|
||||
@@ -25,7 +25,7 @@ namespace Ryujinx.Ava.Input
|
||||
public AvaloniaKeyboardDriver(Control control)
|
||||
{
|
||||
_control = control;
|
||||
_pressedKeys = new HashSet<AvaKey>();
|
||||
_pressedKeys = [];
|
||||
|
||||
_control.KeyDown += OnKeyPress;
|
||||
_control.KeyUp += OnKeyRelease;
|
||||
|
||||
@@ -7,7 +7,8 @@ namespace Ryujinx.Ava.Input
|
||||
{
|
||||
internal static class AvaloniaKeyboardMappingHelper
|
||||
{
|
||||
private static readonly AvaKey[] _keyMapping = {
|
||||
private static readonly AvaKey[] _keyMapping =
|
||||
[
|
||||
// NOTE: Invalid
|
||||
AvaKey.None,
|
||||
|
||||
@@ -143,8 +144,8 @@ namespace Ryujinx.Ava.Input
|
||||
AvaKey.OemBackslash,
|
||||
|
||||
// NOTE: invalid
|
||||
AvaKey.None,
|
||||
};
|
||||
AvaKey.None
|
||||
];
|
||||
|
||||
private static readonly Dictionary<AvaKey, Key> _avaKeyMapping;
|
||||
|
||||
|
||||
Reference in New Issue
Block a user