src/haptic/linux/SDL_syshaptic.c
branchgsoc2008_force_feedback
changeset 2495 66c02abeef0e
parent 2493 6a2482d4af81
child 2496 8f840a6cdf01
--- a/src/haptic/linux/SDL_syshaptic.c	Thu Jul 03 09:13:22 2008 +0000
+++ b/src/haptic/linux/SDL_syshaptic.c	Thu Jul 03 09:58:27 2008 +0000
@@ -612,6 +612,31 @@
 
 
 /*
+ * Gets the status of a haptic effect.
+ */
+int
+SDL_SYS_HapticGetEffectStatus(SDL_Haptic * haptic, struct haptic_effect * effect)
+{
+#if 0  /* Not supported atm. */
+   struct input_event ie;
+
+   ie.type = EV_FF;
+   ie.type = EV_FF_STATUS;
+   ie.code = effect->hweffect->effect.id;
+
+   if (write(haptic->hwdata->fd, &ie, sizeof(ie)) < 0) {
+      SDL_SetError("Error getting haptic device status.");
+      return -1;
+   }
+
+   return 0;
+#endif
+
+   return -1;
+}
+
+
+/*
  * Sets the gain.
  */
 int