changeset 531:8450e66651ea

Fixed joystick detection problem on Windows XP (thanks Maciej!)
author Sam Lantinga <slouken@libsdl.org>
date Tue, 15 Oct 2002 04:26:20 +0000
parents d37660186e58
children 058d47b7a3b4
files src/joystick/win32/SDL_mmjoystick.c
diffstat 1 files changed, 5 insertions(+), 3 deletions(-) [+]
line wrap: on
line diff
--- a/src/joystick/win32/SDL_mmjoystick.c	Mon Oct 14 05:05:04 2002 +0000
+++ b/src/joystick/win32/SDL_mmjoystick.c	Tue Oct 15 04:26:20 2002 +0000
@@ -38,7 +38,7 @@
 #include <windows.h>
 #include <mmsystem.h>
 
-#define MAX_JOYSTICKS	2	/* only 2 are supported in the multimedia API */
+#define MAX_JOYSTICKS	16
 #define MAX_AXES	6	/* each joystick can have up to 6 axes */
 #define MAX_BUTTONS	32	/* and 32 buttons                      */
 #define AXIS_MIN	-32768  /* minimum value for axis coordinate */
@@ -91,8 +91,10 @@
 	}
 
 
-	SYS_JoystickID[0] = JOYSTICKID1;
-	SYS_JoystickID[1] = JOYSTICKID2;
+	for ( i = 0; i < MAX_JOYSTICKS; i++ ) {
+		SYS_JoystickID[i] = JOYSTICKID1 + i;
+	}
+
 
 	for ( i = 0; (i < maxdevs); ++i ) {