include/SDL_haptic.h
branchgsoc2008_force_feedback
changeset 2507 8ef1d0f4d0c1
parent 2506 ba8e99fe92c1
child 2511 f12ae0bae468
equal deleted inserted replaced
2506:ba8e99fe92c1 2507:8ef1d0f4d0c1
   628  * \fn SDL_Haptic * SDL_HapticOpen(int device_index)
   628  * \fn SDL_Haptic * SDL_HapticOpen(int device_index)
   629  *
   629  *
   630  * \brief Opens a Haptic device for usage - the index passed as an
   630  * \brief Opens a Haptic device for usage - the index passed as an
   631  * argument refers to the N'th Haptic device on this system.
   631  * argument refers to the N'th Haptic device on this system.
   632  *
   632  *
   633  * This function returns a Haptic device identifier, or Null
   633  * When opening a haptic device, it's gain will be set to maximum and
   634  * if an error occurred.
   634  *  autocenter will be disabled.  To modify these values use
       
   635  *  SDL_HapticSetGain and SDL_HapticSetAutocenter
   635  *
   636  *
   636  *    \param device_index Index of the device to open.
   637  *    \param device_index Index of the device to open.
   637  *    \return Device identifier or NULL on error.
   638  *    \return Device identifier or NULL on error.
   638  *
   639  *
   639  * \sa SDL_HapticIndex
   640  * \sa SDL_HapticIndex
   640  * \sa SDL_HapticOpenFromJoystick
   641  * \sa SDL_HapticOpenFromJoystick
   641  * \sa SDL_HapticClose
   642  * \sa SDL_HapticClose
       
   643  * \sa SDL_HapticSetGain
       
   644  * \sa SDL_HapticSetAutocenter
   642  */
   645  */
   643 extern DECLSPEC SDL_Haptic * SDL_HapticOpen(int device_index);
   646 extern DECLSPEC SDL_Haptic * SDL_HapticOpen(int device_index);
   644 
   647 
   645 /**
   648 /**
   646  * \fn int SDL_HapticOpened(int device_index)
   649  * \fn int SDL_HapticOpened(int device_index)
   852  *
   855  *
   853  * \brief Sets the global gain of the device.  Gain should be between 0 and 100.
   856  * \brief Sets the global gain of the device.  Gain should be between 0 and 100.
   854  *
   857  *
   855  * Device must support the SDL_HAPTIC_GAIN feature.
   858  * Device must support the SDL_HAPTIC_GAIN feature.
   856  *
   859  *
       
   860  * The user may specify the maxmimum gain by setting the environment variable
       
   861  *  SDL_HAPTIC_GAIN_MAX which should be between 0 and 100.  All calls to
       
   862  *  SDL_HapticSetGain will scale linearly using SDL_HAPTIC_GAIN_MAX as the
       
   863  *  maximum.
       
   864  *
   857  *    \param haptic Haptic device to set the gain on.
   865  *    \param haptic Haptic device to set the gain on.
   858  *    \param gain Value to set the gain to, should be between 0 and 100.
   866  *    \param gain Value to set the gain to, should be between 0 and 100.
   859  *    \return 0 on success or -1 on error.
   867  *    \return 0 on success or -1 on error.
   860  *
   868  *
   861  * \sa SDL_HapticQuery
   869  * \sa SDL_HapticQuery