mirror of
https://github.com/libretro/RetroArch.git
synced 2026-11-22 10:50:15 -10:00
The PlayStation pads' hid handlers now give a core their motion sensors while it asks for them, through the same handler ops as the Switch Pro Controller. - DualShock 4: the gyroscope and accelerometer after the triggers, in USB's report 0x01 and Bluetooth's full report 0x11. - DualSense: from byte 16 of USB's report and Bluetooth's 0x31. - Both use the nominal scale and libretro's axes, through sony_pad_motion.h, as winraw reads the same pads. - DualShock 3: the accelerometer, as SDL reads it: big-endian from byte 41, 113 counts per g around 511. Its one-axis gyroscope is not given, as in SDL. input/common/pad_motion.h holds what the handlers share: a core's ask as a mask, and SDL's axes turned into libretro's as the sdl3 joypad driver turns them. The Switch Pro handler now uses it too.