mirror of
https://git.ryujinx.app/ryubing/ryujinx.git
synced 2025-07-24 06:27:10 +02:00
misc: chore: Use collection expressions in Avalonia project
This commit is contained in:
parent
46a5cafaa8
commit
ae90db2040
28 changed files with 114 additions and 112 deletions
|
@ -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;
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue