joyGetPosEx() was using the wrong variable for specifying a device; this is SDL-1.2
authorRyan C. Gordon <icculus@icculus.org>
Sun, 29 Oct 2006 03:37:24 +0000
branchSDL-1.2
changeset 388636f155ec8133
parent 3885 a10bddfdc40f
child 3887 9dcceea84416
joyGetPosEx() was using the wrong variable for specifying a device; this is
corrected now. (thanks, Ondrej!)

Fixes Bugzilla #267.
src/joystick/win32/SDL_mmjoystick.c
     1.1 --- a/src/joystick/win32/SDL_mmjoystick.c	Sun Oct 29 02:46:42 2006 +0000
     1.2 +++ b/src/joystick/win32/SDL_mmjoystick.c	Sun Oct 29 03:37:24 2006 +0000
     1.3 @@ -167,7 +167,7 @@
     1.4  		
     1.5  		joyinfo.dwSize = sizeof(joyinfo);
     1.6  		joyinfo.dwFlags = JOY_RETURNALL;
     1.7 -		result = joyGetPosEx(SYS_JoystickID[i], &joyinfo);
     1.8 +		result = joyGetPosEx(i, &joyinfo);
     1.9  		if ( result == JOYERR_NOERROR ) {
    1.10  			result = joyGetDevCaps(i, &joycaps, sizeof(joycaps));
    1.11  			if ( result == JOYERR_NOERROR ) {