mirror of
https://github.com/RetroDECK/Duckstation.git
synced 2024-11-23 06:15:38 +00:00
SDLControllerInterface: Fix compilation on older SDL versions (ugh)
This commit is contained in:
parent
4b31806bc9
commit
d1977b20a4
|
@ -43,10 +43,14 @@ bool SDLControllerInterface::Initialize(CommonHostInterface* host_interface)
|
||||||
if (ds4_rumble_enabled)
|
if (ds4_rumble_enabled)
|
||||||
{
|
{
|
||||||
Log_InfoPrintf("Enabling PS4/PS5 enhanced mode.");
|
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, "true");
|
||||||
SDL_SetHint(SDL_HINT_JOYSTICK_HIDAPI_PS4_RUMBLE, "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, "true");
|
||||||
SDL_SetHint(SDL_HINT_JOYSTICK_HIDAPI_PS5_RUMBLE, "true");
|
SDL_SetHint(SDL_HINT_JOYSTICK_HIDAPI_PS5_RUMBLE, "true");
|
||||||
|
#endif
|
||||||
}
|
}
|
||||||
|
|
||||||
if (SDL_InitSubSystem(SDL_INIT_JOYSTICK | SDL_INIT_GAMECONTROLLER | SDL_INIT_HAPTIC) < 0)
|
if (SDL_InitSubSystem(SDL_INIT_JOYSTICK | SDL_INIT_GAMECONTROLLER | SDL_INIT_HAPTIC) < 0)
|
||||||
|
|
Loading…
Reference in a new issue