Skip to content
Snippets Groups Projects
Commit fdb6f2af authored by Eidolon's avatar Eidolon
Browse files

sdl: I can't believe it's more version-guards

parent df28ffd7
Branches
Tags
No related merge requests found
...@@ -103,6 +103,7 @@ INT32 I_NumGamepads(void) ...@@ -103,6 +103,7 @@ INT32 I_NumGamepads(void)
#define USB_PRODUCT_XBOX_SERIES_X_POWERA_FUSION_PRO2 0x4001 #define USB_PRODUCT_XBOX_SERIES_X_POWERA_FUSION_PRO2 0x4001
#define USB_PRODUCT_XBOX_SERIES_X_POWERA_SPECTRA 0x4002 #define USB_PRODUCT_XBOX_SERIES_X_POWERA_SPECTRA 0x4002
#if SDL_VERSION_ATLEAST(2,0,6)
static boolean IsJoystickXboxOneElite(Uint16 vendor_id, Uint16 product_id) static boolean IsJoystickXboxOneElite(Uint16 vendor_id, Uint16 product_id)
{ {
if (vendor_id == USB_VENDOR_MICROSOFT) { if (vendor_id == USB_VENDOR_MICROSOFT) {
...@@ -141,6 +142,7 @@ static boolean IsJoystickXboxSeriesXS(Uint16 vendor_id, Uint16 product_id) ...@@ -141,6 +142,7 @@ static boolean IsJoystickXboxSeriesXS(Uint16 vendor_id, Uint16 product_id)
return false; return false;
} }
#endif
// Opens a controller device // Opens a controller device
static boolean Controller_OpenDevice(UINT8 which, INT32 devindex) static boolean Controller_OpenDevice(UINT8 which, INT32 devindex)
...@@ -885,6 +887,7 @@ boolean I_SetGamepadSmallMotorFreq(UINT8 which, fixed_t freq) ...@@ -885,6 +887,7 @@ boolean I_SetGamepadSmallMotorFreq(UINT8 which, fixed_t freq)
void I_SetGamepadRumblePaused(UINT8 which, boolean pause) void I_SetGamepadRumblePaused(UINT8 which, boolean pause)
{ {
#if SDL_VERSION_ATLEAST(2,0,9)
if (!I_RumbleSupported() || which >= NUM_GAMEPADS) if (!I_RumbleSupported() || which >= NUM_GAMEPADS)
return; return;
...@@ -915,6 +918,11 @@ void I_SetGamepadRumblePaused(UINT8 which, boolean pause) ...@@ -915,6 +918,11 @@ void I_SetGamepadRumblePaused(UINT8 which, boolean pause)
} }
controller->info->rumble.paused = pause; controller->info->rumble.paused = pause;
#else
(void)which;
(void)pause;
return;
#endif
} }
boolean I_GetGamepadRumbleSupported(UINT8 which) boolean I_GetGamepadRumbleSupported(UINT8 which)
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment