Skip to content

Conversation

@bcat
Copy link
Contributor

@bcat bcat commented Jan 22, 2026

Description

RA parses the SDL joystick GUID differently for Windows than it does for Linux. However, SDL has used the same GUID format on all platforms for quite some time (since 2.0.5, and RA's currently bundling 2.0.14.0 with its Windows builds).

Since we currently parse the GUID wrong on Windows, without this change, using the SDL2 driver on Windows results in bogus input_vendor_id and input_product_id values:

wrong-vid-pid

After this change, the values are correct:

right-vid-pid

(Notice the fixed sdl2 driver values now match the correct ones reported by the xinput driver.)

Related Issues

Fixes #18634.

Related Pull Requests

[Any other PRs from related repositories that might be needed for this pull request to work]

@cmitu
Copy link
Contributor

cmitu commented Jan 22, 2026

I think this PR includes - by mistake probably - your own retroarch.cfg, which overwrites the example commented retroarch.cfg present in the repository.

@sonninnos
Copy link
Collaborator

It sure does. Never run RA from the build dir.

@bcat
Copy link
Contributor Author

bcat commented Jan 22, 2026

D'oh. You're right of course. That's why I shouldn't send PRs late at night....

Will fix this evening, apologies.

@sonninnos
Copy link
Collaborator

sonninnos commented Jan 22, 2026

I renamed the skeleton default cfg to avoid similar confusion in the future. Still weird how it got included in since retroarch.cfg is in .gitignore..

Edit: Sigh, had to revert the rename because packaging scripts fail otherwise.

@bcat
Copy link
Contributor Author

bcat commented Jan 23, 2026

Removed the retroarch.cfg that snuck in.

Also tested a bit more locally with various different controllers (XInput, DInput, Switch controllers, wired & wireless, etc.), and this seems to have the desired effect for them all.

Side note: Other than this small bug, I'm quite happy with the SDL controller experience overall. The usual XInput and DInput devices work the same as before, and some controllers that reported identical input_device values (8BitDo Ultimate 2 vs Pro 3) in the xinput driver have distinct ones with the sdl2 driver. But the main QoL improvement is that Switch controllers (Pro Controller, N64 controller, etc.) work without issue. (I did drop in a newer SDL DLL since the RetroArch one is a bit old, and there've been some Switch-related fixes upstream since then.)

@sonninnos sonninnos merged commit e0fe988 into libretro:master Jan 23, 2026
34 checks passed
@bcat bcat deleted the sdl2 branch January 23, 2026 19:36
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.

sdl2 controller driver reports USB VID/PID incorrectly on Windows due to outdated GUID parsing

3 participants