include/SDL_haptic.h
branchgsoc2008_force_feedback
changeset 2517 37c13c12c878
parent 2515 030fc4375e63
child 2519 af9df9662807
     1.1 --- a/include/SDL_haptic.h	Thu Jul 10 17:52:57 2008 +0000
     1.2 +++ b/include/SDL_haptic.h	Thu Jul 10 17:54:08 2008 +0000
     1.3 @@ -70,7 +70,7 @@
     1.4   *    effect_id = SDL_HapticNewEffect( haptic, &effect );
     1.5   *
     1.6   *    // Test the effect
     1.7 - *    SDL_HapticRunEffect( haptic, effect_id );
     1.8 + *    SDL_HapticRunEffect( haptic, effect_id, 1 );
     1.9   *    SDL_Delay( 5000); // Wait for the effect to finish
    1.10   *
    1.11   *    // We destroy the effect, although closing the device also does this
    1.12 @@ -263,6 +263,19 @@
    1.13  #define SDL_HAPTIC_CARTESIAN  1
    1.14  
    1.15  
    1.16 +/*
    1.17 + * Misc defines.
    1.18 + */
    1.19 +/**
    1.20 + * \def SDL_HAPTIC_INFINITY
    1.21 + *
    1.22 + * \brief Used to play a device an infinite number of times.
    1.23 + *
    1.24 + * \sa SDL_HapticRunEffect
    1.25 + */
    1.26 +#define SDL_HAPTIC_INFINITY   -1
    1.27 +
    1.28 +
    1.29  /**
    1.30   * \struct SDL_HapticDirection
    1.31   *
    1.32 @@ -681,7 +694,7 @@
    1.33   *
    1.34   * \sa SDL_HapticOpenFromMouse
    1.35   */
    1.36 -extern DECLSPEC SDL_MouseIsHaptic(void);
    1.37 +extern DECLSPEC int SDL_MouseIsHaptic(void);
    1.38  
    1.39  /**
    1.40   * \fn SDL_Haptic * SDL_HapticOpenFromMouse(void)
    1.41 @@ -830,19 +843,21 @@
    1.42  extern DECLSPEC int SDL_HapticUpdateEffect(SDL_Haptic * haptic, int effect, SDL_HapticEffect * data);
    1.43  
    1.44  /**
    1.45 - * \fn int SDL_HapticRunEffect(SDL_Haptic * haptic, int effect)
    1.46 + * \fn int SDL_HapticRunEffect(SDL_Haptic * haptic, int effect, int iterations)
    1.47   *
    1.48   * \brief Runs the haptic effect on it's assosciated haptic device.
    1.49   *
    1.50   *    \param haptic Haptic device to run the effect on.
    1.51   *    \param effect Identifier of the haptic effect to run.
    1.52 + *    \param iterations Number of iterations to run the effect. Use
    1.53 + *           SDL_HAPTIC_INFINITY for infinity.
    1.54   *    \return 0 on success or -1 on error.
    1.55   *
    1.56   * \sa SDL_HapticStopEffect
    1.57   * \sa SDL_HapticDestroyEffect
    1.58   * \sa SDL_HapticGetEffectStatus
    1.59   */
    1.60 -extern DECLSPEC int SDL_HapticRunEffect(SDL_Haptic * haptic, int effect);
    1.61 +extern DECLSPEC int SDL_HapticRunEffect(SDL_Haptic * haptic, int effect, int iterations);
    1.62  
    1.63  /**
    1.64   * \fn int SDL_HapticStopEffect(SDL_Haptic * haptic, int effect)