Check standard error code return values as < 0 instead of == -1

This commit is contained in:
Sam Lantinga
2024-08-22 06:53:25 -07:00
parent 46d9066a69
commit 037541a0e0
29 changed files with 59 additions and 59 deletions

View File

@@ -218,7 +218,7 @@ static SDL_bool WriteOutput(SDL_DriverWii_Context *ctx, const Uint8 *data, int s
return SDL_hid_write(ctx->device->dev, data, size) >= 0;
} else {
/* Use the rumble thread for general asynchronous writes */
if (SDL_HIDAPI_LockRumble() != 0) {
if (SDL_HIDAPI_LockRumble() < 0) {
return SDL_FALSE;
}
return SDL_HIDAPI_SendRumbleAndUnlock(ctx->device, data, size) >= 0;