src/haptic/darwin/SDL_syshaptic.c
branchgsoc2008_force_feedback
changeset 2562 c284ce0cd8e0
parent 2561 3696b9ce8a37
child 2563 be2ea885d70b
equal deleted inserted replaced
2561:3696b9ce8a37 2562:c284ce0cd8e0
  1101    ret = FFDeviceReleaseEffect(haptic->hwdata->device, effect->hweffect->ref);
  1101    ret = FFDeviceReleaseEffect(haptic->hwdata->device, effect->hweffect->ref);
  1102    if (ret != FF_OK) {
  1102    if (ret != FF_OK) {
  1103       SDL_SetError("Haptic: Error removing the effect from the device: %s.",
  1103       SDL_SetError("Haptic: Error removing the effect from the device: %s.",
  1104                    FFStrError(ret));
  1104                    FFStrError(ret));
  1105    }
  1105    }
  1106    SDL_free(effect->hweffect->effect.lpvTypeSpecificParams);
  1106    SDL_SYS_HapticFreeFFEFFECT(&effect->hweffect->effect, effect->effect.type);
  1107    effect->hweffect->effect.lpvTypeSpecificParams = NULL;
       
  1108    SDL_free(effect->hweffect);
  1107    SDL_free(effect->hweffect);
  1109    effect->hweffect = NULL;
  1108    effect->hweffect = NULL;
  1110 }
  1109 }
  1111 
  1110 
  1112 
  1111