mirror of
https://git.ryujinx.app/projects/Kenji-NX.git
synced 2026-11-19 17:21:15 +01:00
misc: chore: Use explicit types & fix object creation
This commit is contained in:
1 parent
9d3fecf334
commit
76a123b81d
454 files changed
+3042
-2961
No files matched your search
@@ -89,7 +89,7 @@ namespace Ryujinx.Ava.Input
|
||||
return false;
|
||||
}
|
||||
|
||||
AvaloniaKeyboardMappingHelper.TryGetAvaKey(key, out var nativeKey);
|
||||
AvaloniaKeyboardMappingHelper.TryGetAvaKey(key, out AvaKey nativeKey);
|
||||
|
||||
return _pressedKeys.Contains(nativeKey);
|
||||
}
|
||||
|
||||
@@ -151,14 +151,14 @@ namespace Ryujinx.Ava.Input
|
||||
|
||||
static AvaloniaKeyboardMappingHelper()
|
||||
{
|
||||
var inputKeys = Enum.GetValues<Key>();
|
||||
Key[] inputKeys = Enum.GetValues<Key>();
|
||||
|
||||
// NOTE: Avalonia.Input.Key is not contiguous and quite large, so use a dictionary instead of an array.
|
||||
_avaKeyMapping = new Dictionary<AvaKey, Key>();
|
||||
|
||||
foreach (var key in inputKeys)
|
||||
foreach (Key key in inputKeys)
|
||||
{
|
||||
if (TryGetAvaKey(key, out var index))
|
||||
if (TryGetAvaKey(key, out AvaKey index))
|
||||
{
|
||||
_avaKeyMapping[index] = key;
|
||||
}
|
||||
|
||||
Reference in new issue
Block a user