src/haptic/SDL_haptic.c
branchgsoc2008_force_feedback
changeset 2488 8e2bdbccf7ff
parent 2486 24dd8b8669fa
child 2489 96adc8025331
equal deleted inserted replaced
2487:4c8e25ef2d97 2488:8e2bdbccf7ff
   290    }
   290    }
   291    return 1;
   291    return 1;
   292 }
   292 }
   293 
   293 
   294 /*
   294 /*
       
   295  * Updates an effect.
       
   296  */
       
   297 int
       
   298 SDL_HapticUpdateEffect(SDL_Haptic * haptic, int effect, SDL_HapticEffect * data)
       
   299 {
       
   300    if (!ValidHaptic(&haptic) || !ValidEffect(haptic,effect)) {
       
   301       return -1;
       
   302    }
       
   303 
       
   304    /* Updates the effect */
       
   305    if (SDL_SYS_HapticUpdateEffect(haptic,&haptic->effects[effect],data) < 0) {
       
   306       return -1;
       
   307    }
       
   308 
       
   309    return 0;
       
   310 }
       
   311 
       
   312 
       
   313 /*
   295  * Runs the haptic effect on the device.
   314  * Runs the haptic effect on the device.
   296  */
   315  */
   297 int
   316 int
   298 SDL_HapticRunEffect(SDL_Haptic * haptic, int effect)
   317 SDL_HapticRunEffect(SDL_Haptic * haptic, int effect)
   299 {
   318 {