We are currently migrating Bugzilla to GitHub issues.
Any changes made to the bug tracker now will be lost, so please do not post new bugs or make changes to them.
When we're done, all bug URLs will redirect to their equivalent location on the new bug tracker.

Bug 4430

Summary: No meaningful joystick names since 2.0.9? (Windows 10)
Product: SDL Reporter: Ryan C. Gordon <icculus>
Component: joystickAssignee: Sam Lantinga <slouken>
Status: RESOLVED FIXED QA Contact: Sam Lantinga <slouken>
Severity: normal    
Priority: P2 CC: ant
Version: HG 2.0Keywords: target-2.0.12
Hardware: x86   
OS: Windows 10   
URL: https://discourse.libsdl.org/t/no-meaningful-joystick-names-since-2-0-9-windows-10/25451/2

Description Ryan C. Gordon 2018-12-17 17:56:41 UTC
Mentioned on discourse:

https://discourse.libsdl.org/t/no-meaningful-joystick-names-since-2-0-9-windows-10/25451/2

'Before 2.0.9, SDL_JoystickName would return a meaningful brand name for my game controllers, such as “Xbox One Controller” and “Mocute”. Now I just get “X-Input” and “Gamepad”. Am I missing something?

Also since 2.0.9, SDL_GameControllerOpen is producing a “Unexpected controller element” every time, even though it returns non-NULL.'

--ryan.
Comment 1 Ryan C. Gordon 2019-05-18 18:48:54 UTC
Tagging a bunch of bugs with "target-2.0.10" so we have a clear list of things to address before a 2.0.10 release.

Please note that "addressing" one of these bugs might mean deciding to defer on it until after 2.0.10, or resolving it as WONTFIX, etc. This is just here to tell us we should look at it carefully, and soon.

If you have new information or feedback on this issue, this is a good time to add it to the conversation, as we're likely to be paying attention to this specific report in the next few days/weeks.

Thanks!

--ryan.
Comment 2 Anthony @ POW Games 2019-06-20 10:15:25 UTC
Still a problem. Stepping through SDL code, it seems to be whatever is populating JoyStick_DeviceData->joystickname in SDL_windowsjoystick_c.h. I'm not sure how or where to put a breakpoint to get deeper - I only started stepping through code from the SDL_JOYDEVICEADDED event.

It's mainly xBox controllers that are affected, now being called XInput Controller #1, #2, etc.

I'm guessing this started happening since HIDAPI? But when disabling HIDAPI with SDL_HINT_JOYSTICK_HIDAPI, it still happens.
Comment 3 Ryan C. Gordon 2019-07-30 17:49:36 UTC
(Sorry if you get several emails like this, we're marking a bunch of bugs.)

We're hoping to ship SDL 2.0.11 on a much shorter timeframe than we have historically done releases, so I'm starting to tag bugs we hope to have closed in this release cycle.

Note that this tag means we just intend to scrutinize this bug for the 2.0.11 release: we may fix it, reject it, or even push it back to a later release for now, but this helps give us both a goal and a wishlist for the next release.

If this bug has been quiet for a few months and you have new information (such as, "this is definitely still broken" or "this got fixed at some point"), please feel free to retest and/or add more notes to the bug.

--ryan.
Comment 4 Ryan C. Gordon 2019-09-20 20:47:36 UTC
We're changing how we do SDL release versions; now releases will be even numbers (2.0.10, 2.0.12, etc), and as soon as we tag a release, we'll move the internal version number to an odd number (2.0.12 ships, we tag the latest in revision control as 2.0.13 immediately, which will become 2.0.14 on release, etc).

As such, I'm moving the bugs tagged with target-2.0.11 to target 2.0.12. Sorry if you get a lot of email from this change!

Thanks,
--ryan.
Comment 5 Ryan C. Gordon 2019-09-20 20:48:43 UTC
We're changing how we do SDL release versions; now releases will be even numbers (2.0.10, 2.0.12, etc), and as soon as we tag a release, we'll move the internal version number to an odd number (2.0.12 ships, we tag the latest in revision control as 2.0.13 immediately, which will become 2.0.14 on release, etc).

As such, I'm moving the bugs tagged with target-2.0.11 to target 2.0.12. Sorry if you get a lot of email from this change!

Thanks,
--ryan.
Comment 6 Anthony @ POW Games 2019-12-07 18:49:01 UTC
Tested the current source just now and I just noticed that I'm getting proper XBox controller names on the Android build of my game, but still getting X-Input names on Windows 10. Hope it helps :-)
Comment 7 Sam Lantinga 2019-12-07 19:36:10 UTC
Thanks for the update, I'm taking a look for this release.
Comment 8 Sam Lantinga 2020-02-09 22:13:41 UTC
The XInput driver is what's providing the generic names for controllers. I double checked SDL 2.0.8, and it's also providing the generic name for my Xbox controller.

There's currently no way to get more detailed information from XInput. You can disable the XInput driver, but you'll have to provide controller mappings for Xbox controllers and you'll lose rumble and full trigger functionality.

One alternative if you don't need background input, is to enable the HIDAPI driver by commenting out "#undef SDL_JOYSTICK_HIDAPI_XBOX360" in SDL_hidapijoystick_c.h
Comment 9 Anthony @ POW Games 2020-02-12 17:43:15 UTC
Tested again just now with the latest source I'm actually getting "Xbox 360 Controller" on Windows now, instead of "X-Input". So, somehow it got fixed somewhere.