From 320a7587d7e4f8f46cbc94d68cb5f35128ae6cea Mon Sep 17 00:00:00 2001 From: Sam Lantinga Date: Wed, 11 Nov 2020 19:26:59 -0800 Subject: [PATCH] Fixed compiler warnings --- src/joystick/hidapi/SDL_hidapi_ps5.c | 7 +++++++ src/joystick/hidapi/SDL_hidapi_xboxone.c | 2 +- 2 files changed, 8 insertions(+), 1 deletion(-) diff --git a/src/joystick/hidapi/SDL_hidapi_ps5.c b/src/joystick/hidapi/SDL_hidapi_ps5.c index 635770fb5..c0ed674db 100644 --- a/src/joystick/hidapi/SDL_hidapi_ps5.c +++ b/src/joystick/hidapi/SDL_hidapi_ps5.c @@ -132,6 +132,12 @@ HIDAPI_DriverPS5_RumbleJoystick(SDL_HIDAPI_Device *device, SDL_Joystick *joystic return SDL_Unsupported(); } +static int +HIDAPI_DriverPS5_RumbleJoystickTriggers(SDL_HIDAPI_Device *device, SDL_Joystick *joystick, Uint16 left_rumble, Uint16 right_rumble) +{ + return SDL_Unsupported(); +} + static SDL_bool HIDAPI_DriverPS5_HasJoystickLED(SDL_HIDAPI_Device *device, SDL_Joystick *joystick) { @@ -401,6 +407,7 @@ SDL_HIDAPI_DeviceDriver SDL_HIDAPI_DriverPS5 = HIDAPI_DriverPS5_UpdateDevice, HIDAPI_DriverPS5_OpenJoystick, HIDAPI_DriverPS5_RumbleJoystick, + HIDAPI_DriverPS5_RumbleJoystickTriggers, HIDAPI_DriverPS5_HasJoystickLED, HIDAPI_DriverPS5_SetJoystickLED, HIDAPI_DriverPS5_CloseJoystick, diff --git a/src/joystick/hidapi/SDL_hidapi_xboxone.c b/src/joystick/hidapi/SDL_hidapi_xboxone.c index c98e527fd..0a354cfea 100644 --- a/src/joystick/hidapi/SDL_hidapi_xboxone.c +++ b/src/joystick/hidapi/SDL_hidapi_xboxone.c @@ -697,7 +697,7 @@ HIDAPI_DriverXboxOneBluetooth_HandleStatePacketV2(SDL_Joystick *joystick, hid_de button3_bit = 0x04; button4_bit = 0x08; paddles_mapped = (data[35] != 0); - } else if (size == 39) { + } else /* if (size == 39) */ { /* Updated firmware for the Xbox Elite Series 2 controller */ paddle_index = 17; button1_bit = 0x01;