aboutsummaryrefslogtreecommitdiff
path: root/Ryujinx.Input.SDL2/SDL2Gamepad.cs
diff options
context:
space:
mode:
Diffstat (limited to 'Ryujinx.Input.SDL2/SDL2Gamepad.cs')
-rw-r--r--Ryujinx.Input.SDL2/SDL2Gamepad.cs14
1 files changed, 2 insertions, 12 deletions
diff --git a/Ryujinx.Input.SDL2/SDL2Gamepad.cs b/Ryujinx.Input.SDL2/SDL2Gamepad.cs
index eec4e07e..92552673 100644
--- a/Ryujinx.Input.SDL2/SDL2Gamepad.cs
+++ b/Ryujinx.Input.SDL2/SDL2Gamepad.cs
@@ -12,17 +12,7 @@ namespace Ryujinx.Input.SDL2
{
private bool HasConfiguration => _configuration != null;
- private class ButtonMappingEntry
- {
- public readonly GamepadButtonInputId To;
- public readonly GamepadButtonInputId From;
-
- public ButtonMappingEntry(GamepadButtonInputId to, GamepadButtonInputId from)
- {
- To = to;
- From = from;
- }
- }
+ private record struct ButtonMappingEntry(GamepadButtonInputId To, GamepadButtonInputId From);
private StandardControllerInputConfig _configuration;
@@ -85,7 +75,7 @@ namespace Ryujinx.Input.SDL2
public SDL2Gamepad(IntPtr gamepadHandle, string driverId)
{
_gamepadHandle = gamepadHandle;
- _buttonsUserMapping = new List<ButtonMappingEntry>();
+ _buttonsUserMapping = new List<ButtonMappingEntry>(20);
Name = SDL_GameControllerName(_gamepadHandle);
Id = driverId;