pygame-ce
pygame-ce copied to clipboard
PS4 controller on Raspberry Pi OS detected with legacy mappings
pygame-ce 2.4.0 Raspberry Pi OS latest version (running on Raspberry Pi 5 hardware) python 3.11.2
As per docs, a PS4 controller should be recognised by pygame as "PS4 Controller", and does not have any hats (d-pad is read as normal buttons).
On Raspberry Pi OS, it is detected as "Wireless Controller" and exactly matches the note in the docs for pygame 1.x (ref: https://pyga.me/docs/ref/joystick.html )
The difference is that on the Pi, it has a hat, so I have to handle both scenarios in my game, so it works consistently between our Pi and my laptop. If I get a chance, I'll test using a RasPi 4 as well, but that could take me a while.
(note, the above behaviour is seen using three different official Sony controllers and is unchanged in either wired or bluetooth mode)
Assuming this issue can be replicated by others, can it be fixed within the pygame install, or is this a problem with the Raspberry Pi OS distro?