Mercurial > sdl-ios-xcode
diff include/SDL_haptic.h @ 2507:8ef1d0f4d0c1 gsoc2008_force_feedback
Gain is set to max on haptic device open.
Autocenter is disabled on haptic device open.
Maximum gain can be set by SDL_HAPTIC_GAIN_MAX.
author | Edgar Simo <bobbens@gmail.com> |
---|---|
date | Tue, 08 Jul 2008 19:55:12 +0000 |
parents | ba8e99fe92c1 |
children | f12ae0bae468 |
line wrap: on
line diff
--- a/include/SDL_haptic.h Tue Jul 08 19:35:10 2008 +0000 +++ b/include/SDL_haptic.h Tue Jul 08 19:55:12 2008 +0000 @@ -630,8 +630,9 @@ * \brief Opens a Haptic device for usage - the index passed as an * argument refers to the N'th Haptic device on this system. * - * This function returns a Haptic device identifier, or Null - * if an error occurred. + * When opening a haptic device, it's gain will be set to maximum and + * autocenter will be disabled. To modify these values use + * SDL_HapticSetGain and SDL_HapticSetAutocenter * * \param device_index Index of the device to open. * \return Device identifier or NULL on error. @@ -639,6 +640,8 @@ * \sa SDL_HapticIndex * \sa SDL_HapticOpenFromJoystick * \sa SDL_HapticClose + * \sa SDL_HapticSetGain + * \sa SDL_HapticSetAutocenter */ extern DECLSPEC SDL_Haptic * SDL_HapticOpen(int device_index); @@ -854,6 +857,11 @@ * * Device must support the SDL_HAPTIC_GAIN feature. * + * The user may specify the maxmimum gain by setting the environment variable + * SDL_HAPTIC_GAIN_MAX which should be between 0 and 100. All calls to + * SDL_HapticSetGain will scale linearly using SDL_HAPTIC_GAIN_MAX as the + * maximum. + * * \param haptic Haptic device to set the gain on. * \param gain Value to set the gain to, should be between 0 and 100. * \return 0 on success or -1 on error.