Moved a SDL_SetError() call elsewhere to avoid triggering it needlessly.
Otherwise, the XInput path would always trigger it in a harmless manner.
--- a/src/haptic/windows/SDL_syshaptic.c Wed Oct 23 00:58:20 2013 -0400
+++ b/src/haptic/windows/SDL_syshaptic.c Wed Oct 23 15:54:12 2013 -0400
@@ -1190,7 +1190,6 @@
return &GUID_CustomForce;
default:
- SDL_SetError("Haptic: Unknown effect type.");
return NULL;
}
}
@@ -1207,6 +1206,7 @@
REFGUID type = SDL_SYS_HapticEffectType(base);
if ((type == NULL) && (!haptic->hwdata->bXInputHaptic)) {
+ SDL_SetError("Haptic: Unknown effect type.");
goto err_hweffect;
}