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();
|
IEnumerable<GamepadButtonInputId> pressedButtons = _detector.GetPressedButtons();
|
||||||
|
|
||||||
if (pressedButtons.Any())
|
return !_forStick ? new(pressedButtons.FirstOrDefault()) : new((StickInputId)pressedButtons.FirstOrDefault());
|
||||||
{
|
|
||||||
return !_forStick ? new(pressedButtons.First()) : new(((StickInputId)pressedButtons.First()));
|
|
||||||
}
|
|
||||||
|
|
||||||
return null;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
private void CollectButtonStats()
|
private void CollectButtonStats()
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue