src/haptic/SDL_haptic.c
branchgsoc2008_force_feedback
changeset 2523 366d84fdf8d1
parent 2519 af9df9662807
child 2524 1a55848ce198
     1.1 --- a/src/haptic/SDL_haptic.c	Tue Jul 15 17:35:06 2008 +0000
     1.2 +++ b/src/haptic/SDL_haptic.c	Thu Jul 17 11:47:48 2008 +0000
     1.3 @@ -384,6 +384,20 @@
     1.4     return haptic->supported;
     1.5  }
     1.6  
     1.7 +
     1.8 +/*
     1.9 + * Returns the number of axis on the device.
    1.10 + */
    1.11 +int
    1.12 +SDL_HapticNumAxes(SDL_Haptic * haptic)
    1.13 +{
    1.14 +   if (!ValidHaptic(&haptic)) {
    1.15 +      return -1;
    1.16 +   }
    1.17 +
    1.18 +   return haptic->naxes;
    1.19 +}
    1.20 +
    1.21  /*
    1.22   * Checks to see if the device can support the effect.
    1.23   */