Gyro aiming through Bluetooth for PS4 & PS5 controllers

This commit is contained in:
Jaime Moreira 2022-07-05 19:15:10 -04:00
parent 95eabefec9
commit 1fa432f695

View file

@ -1425,6 +1425,14 @@ IN_Controller_Init(qboolean notify_user)
if (!SDL_WasInit(SDL_INIT_GAMECONTROLLER | SDL_INIT_HAPTIC))
{
#ifdef SDL_HINT_JOYSTICK_HIDAPI_PS4_RUMBLE // extended input reports on PS controllers (enables gyro thru bluetooth)
SDL_SetHint( SDL_HINT_JOYSTICK_HIDAPI_PS4_RUMBLE, "1" );
#endif
#ifdef SDL_HINT_JOYSTICK_HIDAPI_PS5_RUMBLE
SDL_SetHint( SDL_HINT_JOYSTICK_HIDAPI_PS5_RUMBLE, "1" );
#endif
if (SDL_Init(SDL_INIT_GAMECONTROLLER | SDL_INIT_HAPTIC) == -1)
{
Com_Printf ("Couldn't init SDL joystick: %s.\n", SDL_GetError ());