mirror of
https://git.ryujinx.app/ryubing/ryujinx.git
synced 2025-07-24 08:37:11 +02:00
misc: chore: Use explicit types in the Avalonia project
This commit is contained in:
parent
3b5f6170d1
commit
be3bd0bcb5
69 changed files with 367 additions and 348 deletions
|
@ -91,7 +91,7 @@ namespace Ryujinx.Ava.Input
|
|||
return false;
|
||||
}
|
||||
|
||||
AvaloniaKeyboardMappingHelper.TryGetAvaKey(key, out var nativeKey);
|
||||
AvaloniaKeyboardMappingHelper.TryGetAvaKey(key, out AvaKey nativeKey);
|
||||
|
||||
return _pressedKeys.Contains(nativeKey);
|
||||
}
|
||||
|
|
|
@ -150,14 +150,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;
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue