mirror of
https://github.com/libsdl-org/SDL.git
synced 2025-10-05 09:26:25 +00:00
Check standard error code return values as < 0 instead of == -1
This commit is contained in:
@@ -411,7 +411,7 @@ int SDL_CreateHapticEffect(SDL_Haptic *haptic, const SDL_HapticEffect *effect)
|
||||
if (haptic->effects[i].hweffect == NULL) {
|
||||
|
||||
/* Now let the backend create the real effect */
|
||||
if (SDL_SYS_HapticNewEffect(haptic, &haptic->effects[i], effect) != 0) {
|
||||
if (SDL_SYS_HapticNewEffect(haptic, &haptic->effects[i], effect) < 0) {
|
||||
return -1; /* Backend failed to create effect */
|
||||
}
|
||||
|
||||
|
Reference in New Issue
Block a user