diff --git a/src/frontend-common/sdl_controller_interface.cpp b/src/frontend-common/sdl_controller_interface.cpp index 1bacefc8a..e2958d274 100644 --- a/src/frontend-common/sdl_controller_interface.cpp +++ b/src/frontend-common/sdl_controller_interface.cpp @@ -43,10 +43,14 @@ bool SDLControllerInterface::Initialize(CommonHostInterface* host_interface) if (ds4_rumble_enabled) { Log_InfoPrintf("Enabling PS4/PS5 enhanced mode."); +#if SDL_VERSION_ATLEAST(2, 0, 9) SDL_SetHint(SDL_HINT_JOYSTICK_HIDAPI_PS4, "true"); SDL_SetHint(SDL_HINT_JOYSTICK_HIDAPI_PS4_RUMBLE, "true"); +#endif +#if SDL_VERSION_ATLEAST(2, 0, 16) SDL_SetHint(SDL_HINT_JOYSTICK_HIDAPI_PS5, "true"); SDL_SetHint(SDL_HINT_JOYSTICK_HIDAPI_PS5_RUMBLE, "true"); +#endif } if (SDL_InitSubSystem(SDL_INIT_JOYSTICK | SDL_INIT_GAMECONTROLLER | SDL_INIT_HAPTIC) < 0)