A structure containing a template for a Condition effect.
Defined in SDL_haptic.h
typedef struct SDL_HapticCondition
{/* Header */
/**< SDL_HAPTIC_SPRING, SDL_HAPTIC_DAMPER,
Uint16 type; SDL_HAPTIC_INERTIA or SDL_HAPTIC_FRICTION */
/**< Direction of the effect - Not used ATM. */
SDL_HapticDirection direction;
/* Replay */
/**< Duration of the effect. */
Uint32 length; /**< Delay before starting the effect. */
Uint16 delay;
/* Trigger */
/**< Button that triggers the effect. */
Uint16 button; /**< How soon it can be triggered again after button. */
Uint16 interval;
/* Condition */
3]; /**< Level when joystick is to the positive side; max 0xFFFF. */
Uint16 right_sat[3]; /**< Level when joystick is to the negative side; max 0xFFFF. */
Uint16 left_sat[3]; /**< How fast to increase the force towards the positive side. */
Sint16 right_coeff[3]; /**< How fast to increase the force towards the negative side. */
Sint16 left_coeff[3]; /**< Size of the dead zone; max 0xFFFF: whole axis-range when 0-centered. */
Uint16 deadband[3]; /**< Position of the dead zone. */
Sint16 center[ } SDL_HapticCondition;
The struct handles the following effects:
Direction is handled by condition internals instead of a direction member. The condition effect specific members have three parameters. The first refers to the X axis, the second refers to the Y axis and the third refers to the Z axis. The right terms refer to the positive side of the axis and the left terms refer to the negative side of the axis. Please refer to the SDL_HapticDirection diagram for which side is positive and which is negative.