src/haptic/darwin/SDL_syshaptic.c
branchgsoc2008_force_feedback
changeset 2561 3696b9ce8a37
parent 2559 42b682e85546
child 2562 c284ce0cd8e0
     1.1 --- a/src/haptic/darwin/SDL_syshaptic.c	Thu Jul 31 09:02:43 2008 +0000
     1.2 +++ b/src/haptic/darwin/SDL_syshaptic.c	Thu Jul 31 09:45:27 2008 +0000
     1.3 @@ -470,19 +470,11 @@
     1.4  void
     1.5  SDL_SYS_HapticClose(SDL_Haptic * haptic)
     1.6  {
     1.7 -   int i;
     1.8 -
     1.9     if (haptic->hwdata) {
    1.10  
    1.11 -      /* Free the effects. */
    1.12 -      for (i=0; i<haptic->neffects; i++) {        
    1.13 -         if (haptic->effects[i].hweffect != NULL) {
    1.14 -            SDL_SYS_HapticFreeFFEFFECT(&haptic->effects[i].hweffect->effect,
    1.15 -                                       haptic->effects[i].effect.type);
    1.16 -            SDL_free(haptic->effects[i].hweffect);
    1.17 -         } 
    1.18 -      }    
    1.19 +      /* Free Effects. */
    1.20        SDL_free(haptic->effects);
    1.21 +      haptic->effects = NULL;
    1.22        haptic->neffects = 0;
    1.23  
    1.24        /* Clean up */