src/haptic/linux/SDL_syshaptic.c
branchgsoc2008_force_feedback
changeset 2489 96adc8025331
parent 2488 8e2bdbccf7ff
child 2490 be9b206d44af
--- a/src/haptic/linux/SDL_syshaptic.c	Tue Jul 01 18:35:05 2008 +0000
+++ b/src/haptic/linux/SDL_syshaptic.c	Wed Jul 02 08:24:35 2008 +0000
@@ -26,6 +26,9 @@
 #include "SDL_haptic.h"
 #include "../SDL_haptic_c.h"
 #include "../SDL_syshaptic.h"
+#include "SDL_joystick.h"
+#include "../../joystick/SDL_sysjoystick.h" /* For the real SDL_Joystick */
+#include "../../joystick/linux/SDL_sysjoystick_c.h" /* For joystick hwdata */ 
 
 #include <unistd.h> /* close */
 #include <linux/input.h>
@@ -244,6 +247,27 @@
 
 
 /*
+ * Checks to see if a joystick has haptic features.
+ */
+int
+SDL_SYS_JoystickIsHaptic(SDL_Joystick * joystick)
+{
+   if (EV_IsHaptic(joystick->hwdata->fd) > 0)
+      return 1;
+   return 0;
+}
+
+
+/*
+ * Opens a SDL_Haptic from a SDL_Joystick.
+ */
+int
+SDL_SYS_HapticOpenFromJoystick(SDL_Haptic * haptic, SDL_Joystick * joystick)
+{
+}
+
+
+/*
  * Closes the haptic device.
  */
 void
@@ -604,5 +628,4 @@
 }
 
 
-
 #endif /* SDL_HAPTIC_LINUX */