Mercurial > sdl-ios-xcode
diff src/haptic/SDL_haptic.c @ 2523:366d84fdf8d1 gsoc2008_force_feedback
Haptic subsystem handles haptic axes now.
Support for SDL_HAPTIC_SPHERICAL on linux.
More error checking.
Improved documentation.
Added missing SDLCALLs to SDL_haptic.h.
author | Edgar Simo <bobbens@gmail.com> |
---|---|
date | Thu, 17 Jul 2008 11:47:48 +0000 |
parents | af9df9662807 |
children | 1a55848ce198 |
line wrap: on
line diff
--- a/src/haptic/SDL_haptic.c Tue Jul 15 17:35:06 2008 +0000 +++ b/src/haptic/SDL_haptic.c Thu Jul 17 11:47:48 2008 +0000 @@ -384,6 +384,20 @@ return haptic->supported; } + +/* + * Returns the number of axis on the device. + */ +int +SDL_HapticNumAxes(SDL_Haptic * haptic) +{ + if (!ValidHaptic(&haptic)) { + return -1; + } + + return haptic->naxes; +} + /* * Checks to see if the device can support the effect. */