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

Add PS4 Controller #804

Closed Vovkiv closed 2 weeks ago

Vovkiv commented 2 weeks ago

(I'm running linux, Fedora Silverblue 41).

I was working on gamepad guesser library based on GUIDs for love2d game framework. But found out that my DualShock 4 GUID is not in this database.

I used Steam's gamepad configuration window and got this string: 03008fe54c050000cc09000000016800,PS4 Controller,crc:e58f,platform:Linux,a:b0,b:b1,x:b2,y:b3,dpleft:h0.8,dpright:h0.2,dpup:h0.1,dpdown:h0.4,leftx:a0,lefty:a1,leftstick:b7,rightx:a2,righty:a3,rightstick:b8,leftshoulder:b9,lefttrigger:a4,rightshoulder:b10,righttrigger:a5,back:b4,start:b6,guide:b5,touchpad:b11,steam:2, Then I adapted it to other PS4 strings and turned into PR.

offalynne commented 2 weeks ago

6800 tail indicates the device is being handled by SDL's HID drivers and does not need a mapping per #478