comparison src/joystick/win32/SDL_mmjoystick.c @ 3886:36f155ec8133 SDL-1.2

joyGetPosEx() was using the wrong variable for specifying a device; this is corrected now. (thanks, Ondrej!) Fixes Bugzilla #267.
author Ryan C. Gordon <icculus@icculus.org>
date Sun, 29 Oct 2006 03:37:24 +0000
parents 5e86e34453d4
children 209a3ef8a328
comparison
equal deleted inserted replaced
3885:a10bddfdc40f 3886:36f155ec8133
165 maxdevs = joyGetNumDevs(); 165 maxdevs = joyGetNumDevs();
166 for ( i = JOYSTICKID1; i < maxdevs && numdevs < MAX_JOYSTICKS; ++i ) { 166 for ( i = JOYSTICKID1; i < maxdevs && numdevs < MAX_JOYSTICKS; ++i ) {
167 167
168 joyinfo.dwSize = sizeof(joyinfo); 168 joyinfo.dwSize = sizeof(joyinfo);
169 joyinfo.dwFlags = JOY_RETURNALL; 169 joyinfo.dwFlags = JOY_RETURNALL;
170 result = joyGetPosEx(SYS_JoystickID[i], &joyinfo); 170 result = joyGetPosEx(i, &joyinfo);
171 if ( result == JOYERR_NOERROR ) { 171 if ( result == JOYERR_NOERROR ) {
172 result = joyGetDevCaps(i, &joycaps, sizeof(joycaps)); 172 result = joyGetDevCaps(i, &joycaps, sizeof(joycaps));
173 if ( result == JOYERR_NOERROR ) { 173 if ( result == JOYERR_NOERROR ) {
174 SYS_JoystickID[numdevs] = i; 174 SYS_JoystickID[numdevs] = i;
175 SYS_Joystick[numdevs] = joycaps; 175 SYS_Joystick[numdevs] = joycaps;