Moved a SDL_SetError() call elsewhere to avoid triggering it needlessly.
authorRyan C. Gordon <icculus@icculus.org>
Wed, 23 Oct 2013 15:54:12 -0400
changeset 788415027aa2cf21
parent 7883 62f562a475e1
child 7885 a8bd63b33636
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
     1.1 --- a/src/haptic/windows/SDL_syshaptic.c	Wed Oct 23 00:58:20 2013 -0400
     1.2 +++ b/src/haptic/windows/SDL_syshaptic.c	Wed Oct 23 15:54:12 2013 -0400
     1.3 @@ -1190,7 +1190,6 @@
     1.4          return &GUID_CustomForce;
     1.5  
     1.6      default:
     1.7 -        SDL_SetError("Haptic: Unknown effect type.");
     1.8          return NULL;
     1.9      }
    1.10  }
    1.11 @@ -1207,6 +1206,7 @@
    1.12      REFGUID type = SDL_SYS_HapticEffectType(base);
    1.13  
    1.14      if ((type == NULL) && (!haptic->hwdata->bXInputHaptic)) {
    1.15 +        SDL_SetError("Haptic: Unknown effect type.");
    1.16          goto err_hweffect;
    1.17      }
    1.18