Commit d0b835b8 authored by Sam Lantinga's avatar Sam Lantinga

Fixed joystick detection problem on Windows XP (thanks Maciej!)

--HG--
extra : convert_revision : svn%3Ac70aab31-4412-0410-b14c-859654838e24/trunk%40532
parent 5560538a
...@@ -38,7 +38,7 @@ static char rcsid = ...@@ -38,7 +38,7 @@ static char rcsid =
#include <windows.h> #include <windows.h>
#include <mmsystem.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_AXES 6 /* each joystick can have up to 6 axes */
#define MAX_BUTTONS 32 /* and 32 buttons */ #define MAX_BUTTONS 32 /* and 32 buttons */
#define AXIS_MIN -32768 /* minimum value for axis coordinate */ #define AXIS_MIN -32768 /* minimum value for axis coordinate */
...@@ -91,8 +91,10 @@ int SDL_SYS_JoystickInit(void) ...@@ -91,8 +91,10 @@ int SDL_SYS_JoystickInit(void)
} }
SYS_JoystickID[0] = JOYSTICKID1; for ( i = 0; i < MAX_JOYSTICKS; i++ ) {
SYS_JoystickID[1] = JOYSTICKID2; SYS_JoystickID[i] = JOYSTICKID1 + i;
}
for ( i = 0; (i < maxdevs); ++i ) { for ( i = 0; (i < maxdevs); ++i ) {
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment