Skip to content

Conversation

brccabral
Copy link
Contributor

SDL3 joystick ID does not start from 0. In my case, my controllers were 4 and 5. First find the ID, then add to the platform/CORE.

@raysan5
Copy link
Owner

raysan5 commented Sep 12, 2025

@brccabral This is a sensible change that can break gamepad detection for many users. Did you make sure this change works for multiple users, gamepads and OS configurations?

@raysan5 raysan5 changed the title fix SDL3 gamepad detection [rcore] Reviewed SDL3 gamepad detection Sep 12, 2025
@brccabral
Copy link
Contributor Author

Tested with two controllers, one Logitech (generic PS2) and one Press Play (generic Nintendo Switch), tested on Windows and Ubuntu. Used examples/core/core_input_gamepad.c for testing

@raysan5 raysan5 merged commit 6cf38b6 into raysan5:master Sep 13, 2025
16 checks passed
@raysan5
Copy link
Owner

raysan5 commented Sep 13, 2025

@brccabral Thanks for the review and confirming it works on Windows and Linux. Please, as you are also working on Web platform lately, could you also test the example on Web? Thanks!

@brccabral
Copy link
Contributor Author

Example looks fine on the web.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants