src/haptic/win32/SDL_syshaptic.c
branchgsoc2008_force_feedback
changeset 2646 9408be170bff
parent 2645 269ba4f28d0e
child 2650 77b5f12bfe11
--- a/src/haptic/win32/SDL_syshaptic.c	Sun Aug 24 17:17:45 2008 +0000
+++ b/src/haptic/win32/SDL_syshaptic.c	Sun Aug 24 17:32:50 2008 +0000
@@ -1344,4 +1344,24 @@
 }
 
 
+/*
+ * Stops all the playing effects on the device.
+ */
+int
+SDL_SYS_HapticUnpause(SDL_Haptic * haptic)
+{
+   HRESULT ret;
+
+   /* Try to stop the effects. */
+   ret = IDirectInputDevice2_SendForceFeedbackCommand( haptic->hwdata->device,
+                                                       DISFFC_STOPALL );
+   if (FAILED(ret)) {
+      DI_SetError("Stopping the device",ret);
+      return -1;
+   }
+   
+   return 0;
+}
+
+
 #endif /* SDL_HAPTIC_DINPUT */