Repository navigation
Give identical connected controllers distinct GameInput device IDs - #1054
ItsNotRexed merged 1 commit into
Conversation
|
Independent Windows test (AI-assisted) for
Only the stock synthetic test was run. Physical hardware (including startup enumeration order and physical rumble/lightbar behavior), GPU behavior, and game integration were outside this run. |
|
Tested 9eaf37e on Windows 11, MSVC 14.51: pass
For other testers: this needs SDL3, so either set |
quackottu
left a comment
There was a problem hiding this comment.
Tested 9eaf37e on NVIDIA GeForce RTX 5070, driver 621.24, Windows 11 Pro (26300), VS 2022 Build Tools, Vulkan SDK 1.4.363.0, with LEONIDA_VK_VALIDATION=1: builds with no regressions, but gameinput_test did not run.
ctest: 47/47 pass. My build has no SDL3, sogameinput_testis disabled and this run does not cover the change itself.- The other test programs give the same results as
main(d3d12_clear_testNVIDIA tie rounding; the 3VUID-...-01387that #1027 fixes;vk_binary_occlusion_testneeds an input file).
ASSET-68. On Windows, SDL enumerated two identical virtual controllers as distinct devices, but a lookup using the second controller’s application-local ID returned the first controller. This broke input routing for callers that saved the ID for player two. Coordination
The first controller retains its existing ID. Simultaneous controllers with the same reported identity now get separate IDs. Reconnecting one reuses its disconnected device object and ID. If multiple indistinguishable controllers disconnect, their reassignment follows arrival order because SDL supplies no distinguishing serial or path.
On native Windows 11 with SDL 3.4.20, the regression suite passed all 145 checks. Seven of those checks failed with the parent shim. The standalone two-controller probe also verified that each saved ID retrieved its own device and that player two’s button arrived through the second device. The suite covers a third controller, reconnects and the existing keyboard controller. This CPU input test used synthetic controllers.
AI-assisted implementation and review.