src/haptic/SDL_haptic.c
branchgsoc2008_force_feedback
changeset 2485 67978eea6d10
parent 2484 666472fd4cb0
child 2486 24dd8b8669fa
--- a/src/haptic/SDL_haptic.c	Tue Jul 01 14:21:09 2008 +0000
+++ b/src/haptic/SDL_haptic.c	Tue Jul 01 14:31:04 2008 +0000
@@ -307,6 +307,24 @@
 }
 
 /*
+ * Stops the haptic effect on the device.
+ */
+int
+SDL_HapticStopEffect(SDL_Haptic * haptic, int effect)
+{
+   if (!ValidHaptic(&haptic) || !ValidEffect(haptic,effect)) {
+      return -1;
+   }
+
+   /* Stop the effect */
+   if (SDL_SYS_HapticStopEffect(haptic,&haptic->effects[effect]) < 0) {
+      return -1;
+   }
+
+   return 0;
+}
+
+/*
  * Gets rid of a haptic effect.
  */
 void