diff src/joystick/linux/SDL_sysjoystick.c @ 2489:96adc8025331 gsoc2008_force_feedback

Exposed some of the joystick stuff to the haptic subsystem. Added SDL_JoystickIsHaptic().
author Edgar Simo <bobbens@gmail.com>
date Wed, 02 Jul 2008 08:24:35 +0000
parents a5de28552be4
children be9b206d44af
line wrap: on
line diff
--- a/src/joystick/linux/SDL_sysjoystick.c	Tue Jul 01 18:35:05 2008 +0000
+++ b/src/joystick/linux/SDL_sysjoystick.c	Wed Jul 02 08:24:35 2008 +0000
@@ -31,13 +31,11 @@
 #include <sys/ioctl.h>
 #include <limits.h>             /* For the definition of PATH_MAX */
 #include <linux/joystick.h>
-#if SDL_INPUT_LINUXEV
-#include <linux/input.h>
-#endif
 
 #include "SDL_joystick.h"
 #include "../SDL_sysjoystick.h"
 #include "../SDL_joystick_c.h"
+#include "SDL_sysjoystick_c.h"
 
 /* Special joystick configurations */
 static struct
@@ -278,35 +276,6 @@
 } SDL_joylist[MAX_JOYSTICKS];
 
 
-/* The private structure used to keep track of a joystick */
-struct joystick_hwdata
-{
-    int fd;
-    /* The current linux joystick driver maps hats to two axes */
-    struct hwdata_hat
-    {
-        int axis[2];
-    } *hats;
-    /* The current linux joystick driver maps balls to two axes */
-    struct hwdata_ball
-    {
-        int axis[2];
-    } *balls;
-
-    /* Support for the Linux 2.4 unified input interface */
-#if SDL_INPUT_LINUXEV
-    SDL_bool is_hid;
-    Uint8 key_map[KEY_MAX - BTN_MISC];
-    Uint8 abs_map[ABS_MAX];
-    struct axis_correct
-    {
-        int used;
-        int coef[3];
-    } abs_correct[ABS_MAX];
-#endif
-};
-
-
 #ifndef NO_LOGICAL_JOYSTICKS
 
 static int