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

@@ -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 */
}