Skip to content

Commit

Permalink
Fix compiler warnings
Browse files Browse the repository at this point in the history
  • Loading branch information
Jimbly committed Mar 16, 2020
1 parent 8cd0864 commit 47da53b
Show file tree
Hide file tree
Showing 6 changed files with 13 additions and 7 deletions.
3 changes: 2 additions & 1 deletion src/joystick/hidapi/SDL_hidapi_gamecube.c
Expand Up @@ -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 */
Expand Down
3 changes: 2 additions & 1 deletion src/joystick/hidapi/SDL_hidapi_ps4.c
Expand Up @@ -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 */
Expand Down
3 changes: 2 additions & 1 deletion src/joystick/hidapi/SDL_hidapi_switch.c
Expand Up @@ -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 */
Expand Down
3 changes: 2 additions & 1 deletion src/joystick/hidapi/SDL_hidapi_xbox360.c
Expand Up @@ -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;
Expand Down Expand Up @@ -1215,7 +1216,7 @@ HIDAPI_DriverXbox360_UpdateOtherAPIs(SDL_HIDAPI_Device *device, SDL_Joystick *jo
}
}
#endif

#endif
}

static SDL_bool
Expand Down
3 changes: 2 additions & 1 deletion src/joystick/hidapi/SDL_hidapi_xbox360w.c
Expand Up @@ -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 */
Expand Down
5 changes: 3 additions & 2 deletions src/joystick/hidapi/SDL_hidapi_xboxone.c
Expand Up @@ -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);
}
Expand Down Expand Up @@ -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 */
Expand Down

0 comments on commit 47da53b

Please sign in to comment.