The PS3 controller works fine over USB out of the box and after adding a line to gamecontrollerdb.txt it works over Bluetooth as well. (There were some Bluetooth PS3 entries already present, but they didn't match my controller, but I guess this is not your problem. I will report it to https://github.com/gabomdq/SDL_GameControllerDB)
Anyway, while the game works perfectly well after doing that, It would be very nice if the Playstation version of in-game button icons were displayed instead of the Xbox ones. Thanks.
I assume you use GetGUIDEXT to find out if a DS4 is being used, in case of the DS3 the value is "4c056802".
This is the line in question for anyone interested, it was generated using `controllermap`:
050000004c0500006802000000800000,PS3 Controller (Bluetooth),a:b0,b:b1,x:b3,y:b2,back:b8,guide:b10,start:b9,leftstick:b11,rightstick:b12,leftshoulder:b4,rightshoulder:b5,dpup:b13,dpdown:b14,dpleft:b15,dpright:b16,leftx:a0,lefty:a1,rightx:a3,righty:a4,lefttrigger:a2,righttrigger:a5,platform:Linux,