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 4464 - SDL_GameControllerName and SDL_JoystickName don't return the expected name for XBox controllers
Summary: SDL_GameControllerName and SDL_JoystickName don't return the expected name fo...
Status: NEW
Alias: None
Product: SDL
Classification: Unclassified
Component: joystick (show other bugs)
Version: 2.0.10
Hardware: x86_64 Windows 10
: P2 minor
Assignee: Sam Lantinga
QA Contact: Sam Lantinga
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2019-01-19 12:43 UTC by Rémy Tassoux
Modified: 2019-08-01 23:11 UTC (History)
1 user (show)

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Rémy Tassoux 2019-01-19 12:43:13 UTC
I have both a XBox 360 and XBox One controller, and if I try to get their name using either SDL_GameControllerName or SDL_JoystickName, the ouput is always "XInput Controller" instead of their real name.
Comment 1 Bob Ombo 2019-02-15 17:46:44 UTC
What is the GUID of your controller?

I have a "compatible" controller, i get:

INFO: Joystick (0)[Microsoft X-Box 360 pad] ADDED!
INFO: Controller (0)[XInput Controller] ADDED!

when using events

SDL_CONTROLLERDEVICEADDED:
SDL_GameControllerNameForIndex(event.cdevice.which)

SDL_JOYDEVICEADDED:
SDL_JoystickNameForIndex(event.jdevice.which)

so i get both, not sure if that's a bug?
Comment 2 Rémy Tassoux 2019-04-04 11:24:35 UTC
Here are the GUIDs and the associated names I get for each controller :

[ XBox 360 Wired Controller ]
GUID: 030000005e0400008e02000000007801
Joystick Name: XInput Controller #1
Controller Name: XInput Controller

[ XBox One S Controller ]
GUID: 030000005e040000ea02000000007801
Joystick Name: XInput Controller #2
Controller Name: XInput Controller

Both are official Microsoft controllers. Their GUIDs are missing from SDL_gamecontrollerdb.h, I guess that's why I get generic names.