src/haptic/windows/SDL_syshaptic.c
changeset 7850 ad4dc7a15ce0
parent 7849 99607295ac82
child 7855 a022d3d782d2
     1.1 --- a/src/haptic/windows/SDL_syshaptic.c	Sun Oct 20 16:02:24 2013 -0400
     1.2 +++ b/src/haptic/windows/SDL_syshaptic.c	Sun Oct 20 16:03:11 2013 -0400
     1.3 @@ -1204,13 +1204,10 @@
     1.4                          SDL_HapticEffect * base)
     1.5  {
     1.6      HRESULT ret;
     1.7 -    REFGUID type = NULL;
     1.8 +    REFGUID type = SDL_SYS_HapticEffectType(base);
     1.9  
    1.10 -    if (!haptic->hwdata->bXInputHaptic) {
    1.11 -        type = SDL_SYS_HapticEffectType(base);
    1.12 -        if (type == NULL) {
    1.13 -            goto err_hweffect;
    1.14 -        }
    1.15 +    if ((type == NULL) && (!haptic->hwdata->bXInputHaptic)) {
    1.16 +        goto err_hweffect;
    1.17      }
    1.18  
    1.19      /* Alloc the effect. */