src/haptic/SDL_haptic.c
branchgsoc2008_force_feedback
changeset 2488 8e2bdbccf7ff
parent 2486 24dd8b8669fa
child 2489 96adc8025331
     1.1 --- a/src/haptic/SDL_haptic.c	Tue Jul 01 16:42:12 2008 +0000
     1.2 +++ b/src/haptic/SDL_haptic.c	Tue Jul 01 18:35:05 2008 +0000
     1.3 @@ -292,6 +292,25 @@
     1.4  }
     1.5  
     1.6  /*
     1.7 + * Updates an effect.
     1.8 + */
     1.9 +int
    1.10 +SDL_HapticUpdateEffect(SDL_Haptic * haptic, int effect, SDL_HapticEffect * data)
    1.11 +{
    1.12 +   if (!ValidHaptic(&haptic) || !ValidEffect(haptic,effect)) {
    1.13 +      return -1;
    1.14 +   }
    1.15 +
    1.16 +   /* Updates the effect */
    1.17 +   if (SDL_SYS_HapticUpdateEffect(haptic,&haptic->effects[effect],data) < 0) {
    1.18 +      return -1;
    1.19 +   }
    1.20 +
    1.21 +   return 0;
    1.22 +}
    1.23 +
    1.24 +
    1.25 +/*
    1.26   * Runs the haptic effect on the device.
    1.27   */
    1.28  int