src/haptic/SDL_haptic.c
branchgsoc2008_force_feedback
changeset 2515 030fc4375e63
parent 2514 840e1b6325c0
child 2517 37c13c12c878
     1.1 --- a/src/haptic/SDL_haptic.c	Thu Jul 10 16:42:43 2008 +0000
     1.2 +++ b/src/haptic/SDL_haptic.c	Thu Jul 10 17:16:11 2008 +0000
     1.3 @@ -356,6 +356,21 @@
     1.4     return haptic->neffects;
     1.5  }
     1.6  
     1.7 +
     1.8 +/*
     1.9 + * Returns the number of effects a haptic device can play.
    1.10 + */
    1.11 +int
    1.12 +SDL_HapticNumEffectsPlaying(SDL_Haptic * haptic)
    1.13 +{
    1.14 +   if (!ValidHaptic(&haptic)) {
    1.15 +      return -1;
    1.16 +   }
    1.17 +
    1.18 +   return haptic->nplaying;
    1.19 +}
    1.20 +
    1.21 +
    1.22  /*
    1.23   * Returns supported effects by the device.
    1.24   */