diff src/haptic/SDL_haptic.c @ 2515:030fc4375e63 gsoc2008_force_feedback

Added SDL_HapticNumEffectsPlaying().
author Edgar Simo <bobbens@gmail.com>
date Thu, 10 Jul 2008 17:16:11 +0000
parents 840e1b6325c0
children 37c13c12c878
line wrap: on
line diff
--- a/src/haptic/SDL_haptic.c	Thu Jul 10 16:42:43 2008 +0000
+++ b/src/haptic/SDL_haptic.c	Thu Jul 10 17:16:11 2008 +0000
@@ -356,6 +356,21 @@
    return haptic->neffects;
 }
 
+
+/*
+ * Returns the number of effects a haptic device can play.
+ */
+int
+SDL_HapticNumEffectsPlaying(SDL_Haptic * haptic)
+{
+   if (!ValidHaptic(&haptic)) {
+      return -1;
+   }
+
+   return haptic->nplaying;
+}
+
+
 /*
  * Returns supported effects by the device.
  */