Skip to content

Commit 43f3991

Browse files
Sackzementslouken
authored andcommitted
linux/SDL_syshaptic.c:SDL_SYS_HapticStopAll(): Fix return on error
1 parent d4819db commit 43f3991

File tree

1 file changed

+2
-3
lines changed

1 file changed

+2
-3
lines changed

src/haptic/linux/SDL_syshaptic.c

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1117,13 +1117,12 @@ bool SDL_SYS_HapticResume(SDL_Haptic *haptic)
11171117
*/
11181118
bool SDL_SYS_HapticStopAll(SDL_Haptic *haptic)
11191119
{
1120-
int i, ret;
1120+
int i;
11211121

11221122
// Linux does not support this natively so we have to loop.
11231123
for (i = 0; i < haptic->neffects; i++) {
11241124
if (haptic->effects[i].hweffect != NULL) {
1125-
ret = SDL_SYS_HapticStopEffect(haptic, &haptic->effects[i]);
1126-
if (ret < 0) {
1125+
if (!SDL_SYS_HapticStopEffect(haptic, &haptic->effects[i])) {
11271126
return SDL_SetError("Haptic: Error while trying to stop all playing effects.");
11281127
}
11291128
}

0 commit comments

Comments
 (0)