mirror of
https://github.com/libsdl-org/SDL.git
synced 2025-09-30 15:08:31 +00:00
re-use return value of SDL_SetError/WIN_SetErrorFromHRESULT/SDL_OutOfMemory
This commit is contained in:
@@ -492,8 +492,7 @@ SDL_DINPUT_HapticOpenFromJoystick(SDL_Haptic * haptic, SDL_Joystick * joystick)
|
||||
++index;
|
||||
}
|
||||
|
||||
SDL_SetError("Couldn't find joystick in haptic device list");
|
||||
return -1;
|
||||
return SDL_SetError("Couldn't find joystick in haptic device list");
|
||||
}
|
||||
|
||||
void
|
||||
@@ -959,8 +958,7 @@ SDL_DINPUT_HapticNewEffect(SDL_Haptic * haptic, struct haptic_effect *effect, SD
|
||||
REFGUID type = SDL_SYS_HapticEffectType(base);
|
||||
|
||||
if (type == NULL) {
|
||||
SDL_SetError("Haptic: Unknown effect type.");
|
||||
return -1;
|
||||
return SDL_SetError("Haptic: Unknown effect type.");
|
||||
}
|
||||
|
||||
/* Get the effect. */
|
||||
|
Reference in New Issue
Block a user