forked from Ports/perfect_dark
port: only enable SDL hints on SDL versions that support them
This commit is contained in:
1 parent
be4d8330bd
commit
e32d719c16
1 file changed
+18
-5
+18
-5
@@ -679,17 +679,30 @@ s32 inputInit(void)
|
|||||||
{
|
{
|
||||||
// Set SDL hints before initializing the controller subsystem.
|
// Set SDL hints before initializing the controller subsystem.
|
||||||
if (useHIDAPI) {
|
if (useHIDAPI) {
|
||||||
SDL_SetHint(SDL_HINT_JOYSTICK_HIDAPI_PS3, "1");
|
#if SDL_VERSION_ATLEAST(2, 0, 12)
|
||||||
SDL_SetHint(SDL_HINT_JOYSTICK_HIDAPI_PS4, "1");
|
SDL_SetHint(SDL_HINT_JOYSTICK_HIDAPI_GAMECUBE, "1");
|
||||||
|
#endif
|
||||||
|
#if SDL_VERSION_ATLEAST(2, 0, 14)
|
||||||
SDL_SetHint(SDL_HINT_JOYSTICK_HIDAPI_PS5, "1");
|
SDL_SetHint(SDL_HINT_JOYSTICK_HIDAPI_PS5, "1");
|
||||||
|
#endif
|
||||||
|
#if SDL_VERSION_ATLEAST(2, 0, 22)
|
||||||
|
SDL_SetHint(SDL_HINT_JOYSTICK_HIDAPI, "1");
|
||||||
|
SDL_SetHint(SDL_HINT_JOYSTICK_HIDAPI_PS4, "1");
|
||||||
SDL_SetHint(SDL_HINT_JOYSTICK_HIDAPI_SWITCH, "1");
|
SDL_SetHint(SDL_HINT_JOYSTICK_HIDAPI_SWITCH, "1");
|
||||||
SDL_SetHint(SDL_HINT_JOYSTICK_HIDAPI_JOY_CONS, "1");
|
SDL_SetHint(SDL_HINT_JOYSTICK_HIDAPI_JOY_CONS, "1");
|
||||||
SDL_SetHint(SDL_HINT_JOYSTICK_HIDAPI_COMBINE_JOY_CONS, "1");
|
|
||||||
SDL_SetHint(SDL_HINT_JOYSTICK_HIDAPI_GAMECUBE, "1");
|
|
||||||
SDL_SetHint(SDL_HINT_JOYSTICK_HIDAPI_WII, "1");
|
|
||||||
// the two hints below enable Rumble and Motion Sensor for PS4/5 pads connected via bluetooth
|
// the two hints below enable Rumble and Motion Sensor for PS4/5 pads connected via bluetooth
|
||||||
SDL_SetHint(SDL_HINT_JOYSTICK_HIDAPI_PS4_RUMBLE, "1");
|
SDL_SetHint(SDL_HINT_JOYSTICK_HIDAPI_PS4_RUMBLE, "1");
|
||||||
SDL_SetHint(SDL_HINT_JOYSTICK_HIDAPI_PS5_RUMBLE, "1");
|
SDL_SetHint(SDL_HINT_JOYSTICK_HIDAPI_PS5_RUMBLE, "1");
|
||||||
|
#endif
|
||||||
|
#if SDL_VERSION_ATLEAST(2, 23, 2)
|
||||||
|
SDL_SetHint(SDL_HINT_JOYSTICK_HIDAPI_COMBINE_JOY_CONS, "1");
|
||||||
|
#endif
|
||||||
|
#if SDL_VERSION_ATLEAST(2, 25, 1)
|
||||||
|
SDL_SetHint(SDL_HINT_JOYSTICK_HIDAPI_PS3, "1");
|
||||||
|
#endif
|
||||||
|
#if SDL_VERSION_ATLEAST(2, 26, 0)
|
||||||
|
SDL_SetHint(SDL_HINT_JOYSTICK_HIDAPI_WII, "1");
|
||||||
|
#endif
|
||||||
}
|
}
|
||||||
if (useRawInput) {
|
if (useRawInput) {
|
||||||
SDL_SetHint(SDL_HINT_JOYSTICK_RAWINPUT, "1");
|
SDL_SetHint(SDL_HINT_JOYSTICK_RAWINPUT, "1");
|
||||||
|
|||||||
Reference in new issue
Block a user