Backed out hg changeset b92b8c52946c. REFGUID is apparently a const type.
authorRyan C. Gordon <icculus@icculus.org>
Sun, 20 Oct 2013 16:03:11 -0400
changeset 7850 ad4dc7a15ce0
parent 7849 99607295ac82
child 7851 c8a0b7c05db8
Backed out hg changeset b92b8c52946c. REFGUID is apparently a const type.
src/haptic/windows/SDL_syshaptic.c
--- a/src/haptic/windows/SDL_syshaptic.c	Sun Oct 20 16:02:24 2013 -0400
+++ b/src/haptic/windows/SDL_syshaptic.c	Sun Oct 20 16:03:11 2013 -0400
@@ -1204,13 +1204,10 @@
                         SDL_HapticEffect * base)
 {
     HRESULT ret;
-    REFGUID type = NULL;
+    REFGUID type = SDL_SYS_HapticEffectType(base);
 
-    if (!haptic->hwdata->bXInputHaptic) {
-        type = SDL_SYS_HapticEffectType(base);
-        if (type == NULL) {
-            goto err_hweffect;
-        }
+    if ((type == NULL) && (!haptic->hwdata->bXInputHaptic)) {
+        goto err_hweffect;
     }
 
     /* Alloc the effect. */