mirror of
https://github.com/boykopovar/AnyPS5.git
synced 2026-10-22 08:33:12 -05:00
The bundled SDL was configured with SDL_HIDAPI OFF, so a DualSense went through the generic joystick driver of the platform: no touchpad, no light bar and no DualSense effect reports, which left the light bar, trigger effect and (on Linux) rumble requests that PadInput already sends through SDL without effect on the controller. With HIDAPI, SDL's PS5 driver handles the pad: touchpad, light bar, rumble, trigger effects and the motion sensors. A USB pad always uses the driver's enhanced reports. SDL_HINT_JOYSTICK_HIDAPI_PS5_RUMBLE enables them for a Bluetooth pad as well, which otherwise stays on the simple report without effects. pad_sdl checks that the bundled SDL is built with the HIDAPI joystick driver.
14 lines
321 B
C++
14 lines
321 B
C++
#include "SDL_config.h"
|
|
|
|
#include <cstdio>
|
|
|
|
int main() {
|
|
#ifdef SDL_JOYSTICK_HIDAPI
|
|
std::puts("pad_sdl: SDL drives controllers through HIDAPI");
|
|
return 0;
|
|
#else
|
|
std::fputs("pad_sdl: SDL is built without HIDAPI, so a DualSense gets no light bar, touchpad or trigger effects\n", stderr);
|
|
return 1;
|
|
#endif
|
|
}
|