include/SDL_haptic.h
branchgsoc2008_force_feedback
changeset 2500 5251d0510b7e
parent 2499 cc2b270608b2
child 2501 ff12f79dfc8d
     1.1 --- a/include/SDL_haptic.h	Sun Jul 06 20:41:00 2008 +0000
     1.2 +++ b/include/SDL_haptic.h	Sun Jul 06 21:47:41 2008 +0000
     1.3 @@ -450,6 +450,9 @@
     1.4   * \brief A structure containing a template for a Condition effect.
     1.5   *
     1.6   * Direction is handled by condition internals instead of a direction member.
     1.7 + *  Each of right_sat, lefT-sat, right_coeff, left_coeff, deadband and center
     1.8 + *  have two parameters, first is for x value, second is for y value following
     1.9 + *  the scheme set by SDL_HapticDirection.
    1.10   *
    1.11   * The struct handles the following effects:
    1.12   *   - SDL_HAPTIC_SPRING: Effect based on axes position.
    1.13 @@ -457,6 +460,7 @@
    1.14   *   - SDL_HAPTIC_INERTIA: Effect based on axes acceleration.
    1.15   *   - SDL_HAPTIC_FRICTION: Effect based on axes movement.
    1.16   *
    1.17 + * \sa SDL_HapticDirection
    1.18   * \sa SDL_HAPTIC_SPRING
    1.19   * \sa SDL_HAPTIC_DAMPER
    1.20   * \sa SDL_HAPTIC_INERTIA
    1.21 @@ -476,12 +480,12 @@
    1.22     Uint16 interval; /**< How soon it can be triggered again after button. */
    1.23  
    1.24     /* Condition */
    1.25 -   Uint16 right_sat; /**< Level when joystick is to the right. */
    1.26 -   Uint16 left_sat; /**< Level when joystick is to the left. */
    1.27 -   Sint16 right_coeff; /**< How fast to increase the force towards the right. */
    1.28 -   Sint16 left_coeff; /**< How fast to increase the force towards the left. */
    1.29 -   Uint16 deadband; /**< Size of the dead zone. */
    1.30 -   Sint16 center; /**< Position of the dead zone. */
    1.31 +   Uint16 right_sat[2]; /**< Level when joystick is to the right. */
    1.32 +   Uint16 left_sat[2]; /**< Level when joystick is to the left. */
    1.33 +   Sint16 right_coeff[2]; /**< How fast to increase the force towards the right. */
    1.34 +   Sint16 left_coeff[2]; /**< How fast to increase the force towards the left. */
    1.35 +   Uint16 deadband[2]; /**< Size of the dead zone. */
    1.36 +   Sint16 center[2]; /**< Position of the dead zone. */
    1.37  } SDL_HapticCondition;
    1.38  /**
    1.39   * \struct SDL_HapticRamp
    1.40 @@ -574,7 +578,7 @@
    1.41     Uint16 type; /**< Effect type. */
    1.42     SDL_HapticConstant constant; /**< Constant effect. */
    1.43     SDL_HapticPeriodic periodic; /**< Periodic effect. */
    1.44 -   SDL_HapticCondition condition[2]; /**< Condition effect, one for each axis. */
    1.45 +   SDL_HapticCondition condition; /**< Condition effect. */
    1.46     SDL_HapticRamp ramp; /**< Ramp effect. */
    1.47  } SDL_HapticEffect;
    1.48