include/SDL_haptic.h
branchgsoc2008_force_feedback
changeset 2507 8ef1d0f4d0c1
parent 2506 ba8e99fe92c1
child 2511 f12ae0bae468
     1.1 --- a/include/SDL_haptic.h	Tue Jul 08 19:35:10 2008 +0000
     1.2 +++ b/include/SDL_haptic.h	Tue Jul 08 19:55:12 2008 +0000
     1.3 @@ -630,8 +630,9 @@
     1.4   * \brief Opens a Haptic device for usage - the index passed as an
     1.5   * argument refers to the N'th Haptic device on this system.
     1.6   *
     1.7 - * This function returns a Haptic device identifier, or Null
     1.8 - * if an error occurred.
     1.9 + * When opening a haptic device, it's gain will be set to maximum and
    1.10 + *  autocenter will be disabled.  To modify these values use
    1.11 + *  SDL_HapticSetGain and SDL_HapticSetAutocenter
    1.12   *
    1.13   *    \param device_index Index of the device to open.
    1.14   *    \return Device identifier or NULL on error.
    1.15 @@ -639,6 +640,8 @@
    1.16   * \sa SDL_HapticIndex
    1.17   * \sa SDL_HapticOpenFromJoystick
    1.18   * \sa SDL_HapticClose
    1.19 + * \sa SDL_HapticSetGain
    1.20 + * \sa SDL_HapticSetAutocenter
    1.21   */
    1.22  extern DECLSPEC SDL_Haptic * SDL_HapticOpen(int device_index);
    1.23  
    1.24 @@ -854,6 +857,11 @@
    1.25   *
    1.26   * Device must support the SDL_HAPTIC_GAIN feature.
    1.27   *
    1.28 + * The user may specify the maxmimum gain by setting the environment variable
    1.29 + *  SDL_HAPTIC_GAIN_MAX which should be between 0 and 100.  All calls to
    1.30 + *  SDL_HapticSetGain will scale linearly using SDL_HAPTIC_GAIN_MAX as the
    1.31 + *  maximum.
    1.32 + *
    1.33   *    \param haptic Haptic device to set the gain on.
    1.34   *    \param gain Value to set the gain to, should be between 0 and 100.
    1.35   *    \return 0 on success or -1 on error.