diff include/SDL_haptic.h @ 2505:abfcba0f3bd1 gsoc2008_force_feedback

Added SDL_HapticIndex.
author Edgar Simo <bobbens@gmail.com>
date Tue, 08 Jul 2008 19:23:03 +0000
parents e68c99a19a2f
children ba8e99fe92c1
line wrap: on
line diff
--- a/include/SDL_haptic.h	Mon Jul 07 18:42:10 2008 +0000
+++ b/include/SDL_haptic.h	Tue Jul 08 19:23:03 2008 +0000
@@ -636,11 +636,25 @@
  *    \param device_index Index of the device to open.
  *    \return Device identifier or NULL on error.
  *
+ * \sa SDL_HapticIndex
  * \sa SDL_HapticOpenFromJoystick
  * \sa SDL_HapticClose
  */
 extern DECLSPEC SDL_Haptic * SDL_HapticOpen(int device_index);
 
+
+/**
+ * \fn int SDL_HapticIndex(SDL_Haptic * haptic)
+ *
+ * \brief Gets the index of a haptic device.
+ *
+ *    \param haptic Haptic device to get the index of.
+ *    \return The index of the haptic device or -1 on error.
+ *
+ * \sa SDL_HapticOpen
+ */
+extern DECLSPEC int SDL_HapticIndex(SDL_Haptic * haptic);
+
 /**
  * \fn int SDL_JoystickIsHaptic(SDL_Joystick * joystick)
  *