From 965a0da90120299df90cbd51cab08a8daf01b309 Mon Sep 17 00:00:00 2001 From: "Ryan C. Gordon" Date: Wed, 23 Oct 2013 15:54:12 -0400 Subject: [PATCH] Moved a SDL_SetError() call elsewhere to avoid triggering it needlessly. Otherwise, the XInput path would always trigger it in a harmless manner. --- src/haptic/windows/SDL_syshaptic.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/haptic/windows/SDL_syshaptic.c b/src/haptic/windows/SDL_syshaptic.c index a9f8d8342b67c..1506235e7eba9 100644 --- a/src/haptic/windows/SDL_syshaptic.c +++ b/src/haptic/windows/SDL_syshaptic.c @@ -1190,7 +1190,6 @@ SDL_SYS_HapticEffectType(SDL_HapticEffect * effect) return &GUID_CustomForce; default: - SDL_SetError("Haptic: Unknown effect type."); return NULL; } } @@ -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; }