Fixed joystick detection problem on Windows XP (thanks Maciej!)
authorSam Lantinga <slouken@libsdl.org>
Tue, 15 Oct 2002 04:26:20 +0000
changeset 5318450e66651ea
parent 530 d37660186e58
child 532 058d47b7a3b4
Fixed joystick detection problem on Windows XP (thanks Maciej!)
src/joystick/win32/SDL_mmjoystick.c
     1.1 --- a/src/joystick/win32/SDL_mmjoystick.c	Mon Oct 14 05:05:04 2002 +0000
     1.2 +++ b/src/joystick/win32/SDL_mmjoystick.c	Tue Oct 15 04:26:20 2002 +0000
     1.3 @@ -38,7 +38,7 @@
     1.4  #include <windows.h>
     1.5  #include <mmsystem.h>
     1.6  
     1.7 -#define MAX_JOYSTICKS	2	/* only 2 are supported in the multimedia API */
     1.8 +#define MAX_JOYSTICKS	16
     1.9  #define MAX_AXES	6	/* each joystick can have up to 6 axes */
    1.10  #define MAX_BUTTONS	32	/* and 32 buttons                      */
    1.11  #define AXIS_MIN	-32768  /* minimum value for axis coordinate */
    1.12 @@ -91,8 +91,10 @@
    1.13  	}
    1.14  
    1.15  
    1.16 -	SYS_JoystickID[0] = JOYSTICKID1;
    1.17 -	SYS_JoystickID[1] = JOYSTICKID2;
    1.18 +	for ( i = 0; i < MAX_JOYSTICKS; i++ ) {
    1.19 +		SYS_JoystickID[i] = JOYSTICKID1 + i;
    1.20 +	}
    1.21 +
    1.22  
    1.23  	for ( i = 0; (i < maxdevs); ++i ) {
    1.24