Simplify enumeration
This commit is contained in:
parent
f2fb9f313c
commit
43fb2753bc
1 changed files with 1 additions and 6 deletions
|
@ -63,12 +63,7 @@ namespace Ryujinx.Input.Assigner
|
|||
{
|
||||
IEnumerable<GamepadButtonInputId> pressedButtons = _detector.GetPressedButtons();
|
||||
|
||||
if (pressedButtons.Any())
|
||||
{
|
||||
return !_forStick ? new(pressedButtons.First()) : new(((StickInputId)pressedButtons.First()));
|
||||
}
|
||||
|
||||
return null;
|
||||
return !_forStick ? new(pressedButtons.FirstOrDefault()) : new((StickInputId)pressedButtons.FirstOrDefault());
|
||||
}
|
||||
|
||||
private void CollectButtonStats()
|
||||
|
|
Loading…
Add table
Reference in a new issue