Skip to content

Commit

Permalink
Moved a SDL_SetError() call elsewhere to avoid triggering it needlessly.
Browse files Browse the repository at this point in the history
Otherwise, the XInput path would always trigger it in a harmless manner.
  • Loading branch information
icculus committed Oct 23, 2013
1 parent 28aa076 commit 965a0da
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/haptic/windows/SDL_syshaptic.c
Expand Up @@ -1190,7 +1190,6 @@ SDL_SYS_HapticEffectType(SDL_HapticEffect * effect)
return &GUID_CustomForce;

default:
SDL_SetError("Haptic: Unknown effect type.");
return NULL;
}
}
Expand All @@ -1207,6 +1206,7 @@ SDL_SYS_HapticNewEffect(SDL_Haptic * haptic, struct haptic_effect *effect,
REFGUID type = SDL_SYS_HapticEffectType(base);

if ((type == NULL) && (!haptic->hwdata->bXInputHaptic)) {
SDL_SetError("Haptic: Unknown effect type.");
goto err_hweffect;
}

Expand Down

0 comments on commit 965a0da

Please sign in to comment.