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

Summary: SDL_GameControllerName and SDL_JoystickName don't return the expected name for XBox controllers
Product: SDL Reporter: Rémy Tassoux <contact>
Component: joystickAssignee: Sam Lantinga <slouken>
Status: NEW --- QA Contact: Sam Lantinga <slouken>
Severity: minor    
Priority: P2 CC: bombo
Version: 2.0.10   
Hardware: x86_64   
OS: Windows 10   

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.