-
Notifications
You must be signed in to change notification settings - Fork 576
Possibly invalid mapping for Xbox Series X controller on Android, already mapped in upstream SDL #913
Description
This is an issue we noticed in Godot (context), and will work around downstream, but my understanding is that it's not Godot specific and the proper solution may be to remove this mapping in SDL_GameControllerDB.
d1f0e1e added the mapping for the Xbox Series X controller 050000005e040000130b0000ffff3f00 on Android in 2020, at a time where it wasn't mapped in SDL.
But SDL later added this mapping in 2021 with libsdl-org/SDL@afd100f, available in 2.0.16 and later.
The mapping in SDL_GameControllerDB differs from the one in latest SDL like this:
-050000005e040000130b0000ffff3f00,Xbox Series Controller,a:b0,b:b1,back:b15,dpdown:b12,dpleft:b13,dpright:b14,dpup:b11,leftshoulder:b9,leftstick:b7,lefttrigger:a4,leftx:a0,lefty:a1,rightshoulder:b10,rightstick:b8,righttrigger:a5,rightx:a2,righty:a3,start:b6,x:b2,y:b3,platform:Android,
+050000005e040000130b0000ffff3f00,Xbox Series X Controller,a:b0,b:b1,back:b4,dpdown:b12,dpleft:b13,dpright:b14,dpup:b11,guide:b5,leftshoulder:b9,leftstick:b7,lefttrigger:a4,leftx:a0,lefty:a1,rightshoulder:b10,rightstick:b8,righttrigger:a5,rightx:a2,righty:a3,start:b6,x:b2,y:b3,platform:Android,i.e.:
- Slightly differ name
- Fixes
backbutton - Adds
guide
I assume the one in SDL_GameControllerDB should be either updated to match SDL, or removed since it's in SDL already.
SDL also has a mapping for 050000005e040000120b000000783f80 which is in sync with the one in SDL_GameControllerDB (aside from the added "X" in the name).
Note also libsdl-org/SDL#14921 which adds the missing misc1 / Guide button, if it's accepted in SDL, it could be a reason to keep a mapping downstream in SDL_GameControllerDB synced with latest SDL, for users of older versions of SDL.