Added SDL_hidapi_rumble.c to the macOS, iOS and tvOS builds

This commit is contained in:
Sam Lantinga
2020-02-04 15:42:49 -08:00
parent 7c7ae00294
commit 1bd120266f
4 changed files with 62 additions and 4 deletions

View File

@@ -141,7 +141,7 @@ int SDL_HIDAPI_SendRumble(SDL_HIDAPI_Device *device, const Uint8 *data, int size
SDL_HIDAPI_RumbleRequest *request;
if (size > sizeof(request->data)) {
return SDL_SetError("Couldn't send rumble, size %d is greater than %d", size, sizeof(request->data));
return SDL_SetError("Couldn't send rumble, size %d is greater than %d", size, (int)sizeof(request->data));
}
if (!ctx->running) {
@@ -174,7 +174,7 @@ int SDL_HIDAPI_SendRumble(SDL_HIDAPI_Device *device, const Uint8 *data, int size
return size;
}
void SDL_HIDAPI_QuitRumble()
void SDL_HIDAPI_QuitRumble(void)
{
SDL_HIDAPI_RumbleContext *ctx = &rumble_context;

View File

@@ -24,7 +24,7 @@
/* Handle rumble on a separate thread so it doesn't block the application */
int SDL_HIDAPI_SendRumble(SDL_HIDAPI_Device *device, const Uint8 *data, int size);
void SDL_HIDAPI_QuitRumble();
void SDL_HIDAPI_QuitRumble(void);
#endif /* SDL_JOYSTICK_HIDAPI */