Skip to content

Commit 5837347

Browse files
committed
joyGetPosEx() was using the wrong variable for specifying a device; this is
corrected now. (thanks, Ondrej!) Fixes Bugzilla libsdl-org#267.
1 parent daf7a5a commit 5837347

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/joystick/win32/SDL_mmjoystick.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -167,7 +167,7 @@ int SDL_SYS_JoystickInit(void)
167167

168168
joyinfo.dwSize = sizeof(joyinfo);
169169
joyinfo.dwFlags = JOY_RETURNALL;
170-
result = joyGetPosEx(SYS_JoystickID[i], &joyinfo);
170+
result = joyGetPosEx(i, &joyinfo);
171171
if ( result == JOYERR_NOERROR ) {
172172
result = joyGetDevCaps(i, &joycaps, sizeof(joycaps));
173173
if ( result == JOYERR_NOERROR ) {

0 commit comments

Comments
 (0)