Added preferences to dinput drivers (so we can have two joystick
drivers). Implemented a joystick driver for the Linux 2.4
dev/input/event API.

diff --git a/include/config.h.in b/include/config.h.in
index 5d01154..4e4ee3f 100644
--- a/include/config.h.in
+++ b/include/config.h.in
@@ -329,6 +329,9 @@
 /* Define if you have the <linux/cdrom.h> header file.  */
 #undef HAVE_LINUX_CDROM_H
 
+/* Define if you have the <linux/input.h> header file.  */
+#undef HAVE_LINUX_INPUT_H
+
 /* Define if you have the <linux/joystick.h> header file.  */
 #undef HAVE_LINUX_JOYSTICK_H
 
diff --git a/include/dinput.h b/include/dinput.h
index 42a8db6..456441e 100644
--- a/include/dinput.h
+++ b/include/dinput.h
@@ -175,6 +175,9 @@
 #define DIDEVTYPEJOYSTICK_WHEEL         6
 #define DIDEVTYPEJOYSTICK_HEADTRACKER   7
 
+#define GET_DIDEVICE_TYPE(dwDevType)     LOBYTE(dwDevType)
+#define GET_DIDEVICE_SUBTYPE(dwDevType)  HIBYTE(dwDevType)
+
 typedef struct {
     DWORD	dwSize;
     GUID	guidType;