mdqinc / SDL_GameControllerDB

A community sourced database of game controller mappings to be used with SDL2 Game Controller functionality
http://libsdl.org
zlib License
1.38k stars 520 forks source link

Mapping for Xbox One Controller on macOS 14 Sonoma #774

Closed raphaelmenges closed 4 months ago

raphaelmenges commented 4 months ago

Hi 👋,

I am using this DB through girls and experience a mismapping of my Xbox One Controller on macOS 14.5. I have created a new mapping with the SDL2 Gamepad Tool and tested it successful in gilrs by setting the mapping in the SDL_GAMECONTROLLERCONFIG environment variable. The mapping is as follows:

030000005e040000e002000003090000,Xbox One Controller,platform:Mac OS X,a:b0,b:b1,x:b2,y:b3,back:b6,guide:b10,start:b7,leftstick:b8,rightstick:b9,leftshoulder:b4,rightshoulder:b5,dpup:h0.1,dpdown:h0.4,dpleft:h0.8,dpright:h0.2,leftx:a0,lefty:a1,rightx:a3,righty:a4,lefttrigger:a2,righttrigger:a5,

However, the same id is already registered in the DB with a different mapping:

030000005e040000e002000003090000,Xbox One Controller,a:b0,b:b1,back:b16,dpdown:h0.4,dpleft:h0.8,dpright:h0.2,dpup:h0.1,guide:b15,leftshoulder:b6,leftstick:b13,lefttrigger:a5,leftx:a0,lefty:a1,rightshoulder:b7,rightstick:b14,righttrigger:a4,rightx:a2,righty:a3,start:b11,x:b3,y:b4,platform:Mac OS X,

How can that be?

offalynne commented 4 months ago

How can that be?

User error, driver change, or firmware change

Please open a PR overriding the incorrect mapping

Thanks

raphaelmenges commented 4 months ago

Done: https://github.com/mdqinc/SDL_GameControllerDB/pull/775

As I understand the mappings, the mapping applies for all versions of macOS the same. Perhaps there should be also a field indicating the macOS version the mapping has been tested with? Perhaps the old mapping is fine for macOS 13 etc. 😅