Ryujinx/src
riperiperi 90455a05e6
Input: Improve controller identification (#6029)
* Input: Improve controller identification

Controllers were identified before by a combination of their _global_ index in the list of controllers and their GUID. The problem is, disconnecting and reconnecting a controller can change its global index; the controller can appear at the end. This would give it another ID, and the controller would need to be reconfigured.

This happened to me a lot with a switch pro controller and a USB game controller, it was essentially random which appeared first. Now, it consistently detects them.

This PR changes the controller identification to be a combination of an index of controllers with the same GUID (generally 0), and its GUID. It also reworks managing the list of controllers to properly consider instance IDs.

This also changes the NpadManager to attempt to reuse old controllers when refreshing input configuration, which can prevent input from going dead for seconds whenever a controller connects or disconnects (and the switch pro controller just entirely dying).

Testing with different controller types, OS and Avalonia is welcome. Remember that the target is connecting a ton of controllers, and pulling/reconnecting them.

* Remove double empty line
2024-01-22 17:02:44 -03:00
..
ARMeilleure Implement a new JIT for Arm devices (#6057) 2024-01-20 11:11:28 -03:00
Ryujinx Change shader cache init wait method (#6131) 2024-01-18 14:17:38 -03:00
Ryujinx.Audio Fix integer overflow on downsample surround to stereo (#6160) 2024-01-21 21:11:46 +01:00
Ryujinx.Audio.Backends.OpenAL editorconfig: Set default encoding to UTF-8 (#5793) 2023-12-04 14:17:13 +01:00
Ryujinx.Audio.Backends.SDL2 editorconfig: Set default encoding to UTF-8 (#5793) 2023-12-04 14:17:13 +01:00
Ryujinx.Audio.Backends.SoundIo editorconfig: Set default encoding to UTF-8 (#5793) 2023-12-04 14:17:13 +01:00
Ryujinx.Ava Change shader cache init wait method (#6131) 2024-01-18 14:17:38 -03:00
Ryujinx.Common Support portable mode using the macOS app bundle. (#6147) 2024-01-20 03:09:51 +01:00
Ryujinx.Cpu Implement a new JIT for Arm devices (#6057) 2024-01-20 11:11:28 -03:00
Ryujinx.Graphics.Device editorconfig: Set default encoding to UTF-8 (#5793) 2023-12-04 14:17:13 +01:00
Ryujinx.Graphics.GAL Implement support for multi-range buffers using Vulkan sparse mappings (#5427) 2023-12-04 20:30:19 +01:00
Ryujinx.Graphics.Gpu Change shader cache init wait method (#6131) 2024-01-18 14:17:38 -03:00
Ryujinx.Graphics.Host1x editorconfig: Set default encoding to UTF-8 (#5793) 2023-12-04 14:17:13 +01:00
Ryujinx.Graphics.Nvdec editorconfig: Set default encoding to UTF-8 (#5793) 2023-12-04 14:17:13 +01:00
Ryujinx.Graphics.Nvdec.FFmpeg editorconfig: Set default encoding to UTF-8 (#5793) 2023-12-04 14:17:13 +01:00
Ryujinx.Graphics.Nvdec.Vp9 editorconfig: Set default encoding to UTF-8 (#5793) 2023-12-04 14:17:13 +01:00
Ryujinx.Graphics.OpenGL Implement support for multi-range buffers using Vulkan sparse mappings (#5427) 2023-12-04 20:30:19 +01:00
Ryujinx.Graphics.Shader editorconfig: Set default encoding to UTF-8 (#5793) 2023-12-04 14:17:13 +01:00
Ryujinx.Graphics.Texture editorconfig: Set default encoding to UTF-8 (#5793) 2023-12-04 14:17:13 +01:00
Ryujinx.Graphics.Vic editorconfig: Set default encoding to UTF-8 (#5793) 2023-12-04 14:17:13 +01:00
Ryujinx.Graphics.Video editorconfig: Set default encoding to UTF-8 (#5793) 2023-12-04 14:17:13 +01:00
Ryujinx.Graphics.Vulkan Vulkan: Use templates for descriptor updates (#6014) 2024-01-20 11:07:33 -03:00
Ryujinx.Headless.SDL2 Change shader cache init wait method (#6131) 2024-01-18 14:17:38 -03:00
Ryujinx.HLE Implement a new JIT for Arm devices (#6057) 2024-01-20 11:11:28 -03:00
Ryujinx.Horizon editorconfig: Set default encoding to UTF-8 (#5793) 2023-12-04 14:17:13 +01:00
Ryujinx.Horizon.Common editorconfig: Set default encoding to UTF-8 (#5793) 2023-12-04 14:17:13 +01:00
Ryujinx.Horizon.Generators editorconfig: Set default encoding to UTF-8 (#5793) 2023-12-04 14:17:13 +01:00
Ryujinx.Horizon.Kernel.Generators editorconfig: Set default encoding to UTF-8 (#5793) 2023-12-04 14:17:13 +01:00
Ryujinx.Input Input: Improve controller identification (#6029) 2024-01-22 17:02:44 -03:00
Ryujinx.Input.SDL2 Input: Improve controller identification (#6029) 2024-01-22 17:02:44 -03:00
Ryujinx.Memory Implement support for multi-range buffers using Vulkan sparse mappings (#5427) 2023-12-04 20:30:19 +01:00
Ryujinx.SDL2.Common editorconfig: Set default encoding to UTF-8 (#5793) 2023-12-04 14:17:13 +01:00
Ryujinx.ShaderTools editorconfig: Set default encoding to UTF-8 (#5793) 2023-12-04 14:17:13 +01:00
Ryujinx.Tests Change shader cache init wait method (#6131) 2024-01-18 14:17:38 -03:00
Ryujinx.Tests.Memory editorconfig: Set default encoding to UTF-8 (#5793) 2023-12-04 14:17:13 +01:00
Ryujinx.Tests.Unicorn editorconfig: Set default encoding to UTF-8 (#5793) 2023-12-04 14:17:13 +01:00
Ryujinx.Ui.Common ApplicationLibrary: Skip invalid symlinks (#6004) 2023-12-04 19:16:34 +01:00
Ryujinx.Ui.LocaleGenerator editorconfig: Set default encoding to UTF-8 (#5793) 2023-12-04 14:17:13 +01:00
Spv.Generator editorconfig: Set default encoding to UTF-8 (#5793) 2023-12-04 14:17:13 +01:00