Just wondering if these controllers have the same values for all the buttons on Windows, Mac and Linux? I only have a 360 controller and if I don’t need to buy an Xbox One controller that’s a plus. Thanks.

EDIT: Also anybody know what SDL_JoystickName will return for an Xbox One controller? Hopefully something that can identify it as such.

I have both a wireless Xbox one controller and a wired Xbox 360 controller, and I can confirm that they have the exact same values for their buttons and their axis on a Windows platform. The returned name is “XInput Controller” for both with SDL_JoystickName.

When I first saw this, I thought it was not ideal but still correct because the Xbox 360 and One controllers are indeed XInput controllers. But if this function is supposed to return an unique name for each controller, you’re right, this is a bug.

OK so that function won’t do it, but there must be a way to detect the controller type? I’d like to give correct button names, for example the middle buttons are named differently between 360 and Xbox One. Anybody know how to get the specific controller type?

FWIW on Linux I get “Xbox 360 Wireless Receiver” for a wireless 360 controller with SDL_JoystickName.

Will print X360 Wireless Controller instead of Xbox 360 Wireless Receiver on Linux, and for a PS4 controller it returns PS4 Controller instead of Wireless Controller. I guess this api also makes the button layouts all consistent. Unfortunately I wish I had known about it before because it’s not event based like the SDL_Joystick api.

EDIT: Actually, there may be events, I have to check it out more.

Well I’ll be damned. It has events, so this is a lot easier and better…