mirror of
https://git.ryujinx.app/ryubing/ryujinx.git
synced 2025-12-21 16:37:00 +00:00
misc: chore: Use collection expressions in Input projects
This commit is contained in:
parent
9f3eac7f26
commit
45125c16cf
6 changed files with 31 additions and 28 deletions
|
|
@ -46,7 +46,7 @@ namespace Ryujinx.Input.HLE
|
|||
_keyboardDriver = keyboardDriver;
|
||||
_gamepadDriver = gamepadDriver;
|
||||
_mouseDriver = mouseDriver;
|
||||
_inputConfig = new List<InputConfig>();
|
||||
_inputConfig = [];
|
||||
|
||||
_gamepadDriver.OnGamepadConnected += HandleOnGamepadConnected;
|
||||
_gamepadDriver.OnGamepadDisconnected += HandleOnGamepadDisconnected;
|
||||
|
|
@ -56,7 +56,7 @@ namespace Ryujinx.Input.HLE
|
|||
{
|
||||
lock (_lock)
|
||||
{
|
||||
List<InputConfig> validInputs = new();
|
||||
List<InputConfig> validInputs = [];
|
||||
foreach (InputConfig inputConfigEntry in _inputConfig)
|
||||
{
|
||||
if (_controllers[(int)inputConfigEntry.PlayerIndex] != null)
|
||||
|
|
@ -124,7 +124,7 @@ namespace Ryujinx.Input.HLE
|
|||
{
|
||||
NpadController[] oldControllers = _controllers.ToArray();
|
||||
|
||||
List<InputConfig> validInputs = new();
|
||||
List<InputConfig> validInputs = [];
|
||||
|
||||
foreach (InputConfig inputConfigEntry in inputConfig)
|
||||
{
|
||||
|
|
@ -205,7 +205,7 @@ namespace Ryujinx.Input.HLE
|
|||
{
|
||||
lock (_lock)
|
||||
{
|
||||
List<GamepadInput> hleInputStates = new();
|
||||
List<GamepadInput> hleInputStates = [];
|
||||
List<SixAxisInput> hleMotionStates = new(NpadDevices.MaxControllers);
|
||||
|
||||
KeyboardInput? hleKeyboardInput = null;
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue