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 3886 36f155ec8133
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
--- a/src/joystick/win32/SDL_mmjoystick.c	Sun Oct 29 02:46:42 2006 +0000
+++ b/src/joystick/win32/SDL_mmjoystick.c	Sun Oct 29 03:37:24 2006 +0000
@@ -167,7 +167,7 @@
 		
 		joyinfo.dwSize = sizeof(joyinfo);
 		joyinfo.dwFlags = JOY_RETURNALL;
-		result = joyGetPosEx(SYS_JoystickID[i], &joyinfo);
+		result = joyGetPosEx(i, &joyinfo);
 		if ( result == JOYERR_NOERROR ) {
 			result = joyGetDevCaps(i, &joycaps, sizeof(joycaps));
 			if ( result == JOYERR_NOERROR ) {