diff --git a/src/joystick/hidapi/SDL_hidapi_gamecube.c b/src/joystick/hidapi/SDL_hidapi_gamecube.c index 35b25bd93..80e5495bd 100644 --- a/src/joystick/hidapi/SDL_hidapi_gamecube.c +++ b/src/joystick/hidapi/SDL_hidapi_gamecube.c @@ -404,7 +404,8 @@ SDL_HIDAPI_DeviceDriver SDL_HIDAPI_DriverGameCube = HIDAPI_DriverGameCube_OpenJoystick, HIDAPI_DriverGameCube_RumbleJoystick, HIDAPI_DriverGameCube_CloseJoystick, - HIDAPI_DriverGameCube_FreeDevice + HIDAPI_DriverGameCube_FreeDevice, + NULL, }; #endif /* SDL_JOYSTICK_HIDAPI_GAMECUBE */ diff --git a/src/joystick/hidapi/SDL_hidapi_ps4.c b/src/joystick/hidapi/SDL_hidapi_ps4.c index f56fdc326..fe21ac04e 100644 --- a/src/joystick/hidapi/SDL_hidapi_ps4.c +++ b/src/joystick/hidapi/SDL_hidapi_ps4.c @@ -529,7 +529,8 @@ SDL_HIDAPI_DeviceDriver SDL_HIDAPI_DriverPS4 = HIDAPI_DriverPS4_OpenJoystick, HIDAPI_DriverPS4_RumbleJoystick, HIDAPI_DriverPS4_CloseJoystick, - HIDAPI_DriverPS4_FreeDevice + HIDAPI_DriverPS4_FreeDevice, + NULL }; #endif /* SDL_JOYSTICK_HIDAPI_PS4 */ diff --git a/src/joystick/hidapi/SDL_hidapi_switch.c b/src/joystick/hidapi/SDL_hidapi_switch.c index a6747357e..d92673ab1 100644 --- a/src/joystick/hidapi/SDL_hidapi_switch.c +++ b/src/joystick/hidapi/SDL_hidapi_switch.c @@ -1164,7 +1164,8 @@ SDL_HIDAPI_DeviceDriver SDL_HIDAPI_DriverSwitch = HIDAPI_DriverSwitch_OpenJoystick, HIDAPI_DriverSwitch_RumbleJoystick, HIDAPI_DriverSwitch_CloseJoystick, - HIDAPI_DriverSwitch_FreeDevice + HIDAPI_DriverSwitch_FreeDevice, + NULL }; #endif /* SDL_JOYSTICK_HIDAPI_SWITCH */ diff --git a/src/joystick/hidapi/SDL_hidapi_xbox360.c b/src/joystick/hidapi/SDL_hidapi_xbox360.c index d22c9544d..d136d5a5a 100644 --- a/src/joystick/hidapi/SDL_hidapi_xbox360.c +++ b/src/joystick/hidapi/SDL_hidapi_xbox360.c @@ -991,6 +991,7 @@ HIDAPI_DriverXbox360_HandleStatePacket(SDL_Joystick *joystick, hid_device *dev, static void HIDAPI_DriverXbox360_UpdateOtherAPIs(SDL_HIDAPI_Device *device, SDL_Joystick *joystick) { +#if defined(SDL_JOYSTICK_HIDAPI_WINDOWS_MATCHING) || defined(SDL_JOYSTICK_HIDAPI_WINDOWS_XINPUT) || defined(SDL_JOYSTICK_HIDAPI_WINDOWS_GAMING_INPUT) SDL_DriverXbox360_Context *ctx = (SDL_DriverXbox360_Context *)device->context; SDL_bool has_trigger_data = SDL_FALSE; SDL_bool correlated = SDL_FALSE; @@ -1215,7 +1216,7 @@ HIDAPI_DriverXbox360_UpdateOtherAPIs(SDL_HIDAPI_Device *device, SDL_Joystick *jo } } #endif - +#endif } static SDL_bool diff --git a/src/joystick/hidapi/SDL_hidapi_xbox360w.c b/src/joystick/hidapi/SDL_hidapi_xbox360w.c index 9834870a5..40721db78 100644 --- a/src/joystick/hidapi/SDL_hidapi_xbox360w.c +++ b/src/joystick/hidapi/SDL_hidapi_xbox360w.c @@ -296,7 +296,8 @@ SDL_HIDAPI_DeviceDriver SDL_HIDAPI_DriverXbox360W = HIDAPI_DriverXbox360W_OpenJoystick, HIDAPI_DriverXbox360W_RumbleJoystick, HIDAPI_DriverXbox360W_CloseJoystick, - HIDAPI_DriverXbox360W_FreeDevice + HIDAPI_DriverXbox360W_FreeDevice, + NULL }; #endif /* SDL_JOYSTICK_HIDAPI_XBOX360 */ diff --git a/src/joystick/hidapi/SDL_hidapi_xboxone.c b/src/joystick/hidapi/SDL_hidapi_xboxone.c index 48568d460..4fe23f228 100644 --- a/src/joystick/hidapi/SDL_hidapi_xboxone.c +++ b/src/joystick/hidapi/SDL_hidapi_xboxone.c @@ -763,7 +763,7 @@ HIDAPI_DriverXboxOne_UpdateDevice(SDL_HIDAPI_Device *device) if (size < 0) { /* Read error, device is disconnected */ - HIDAPI_JoystickDisconnected(device, joystick->instance_id); + HIDAPI_JoystickDisconnected(device, joystick->instance_id, SDL_FALSE); } return (size >= 0); } @@ -796,7 +796,8 @@ SDL_HIDAPI_DeviceDriver SDL_HIDAPI_DriverXboxOne = HIDAPI_DriverXboxOne_OpenJoystick, HIDAPI_DriverXboxOne_RumbleJoystick, HIDAPI_DriverXboxOne_CloseJoystick, - HIDAPI_DriverXboxOne_FreeDevice + HIDAPI_DriverXboxOne_FreeDevice, + NULL }; #endif /* SDL_JOYSTICK_HIDAPI_XBOXONE */