We are currently migrating Bugzilla to GitHub issues.
Any changes made to the bug tracker now will be lost, so please do not post new bugs or make changes to them.
When we're done, all bug URLs will redirect to their equivalent location on the new bug tracker.

Bug 267 - Joystick is not detected
Summary: Joystick is not detected
Status: RESOLVED FIXED
Alias: None
Product: SDL
Classification: Unclassified
Component: joystick (show other bugs)
Version: 1.2.11
Hardware: x86 Windows (All)
: P2 normal
Assignee: Ryan C. Gordon
QA Contact: Sam Lantinga
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2006-06-27 14:53 UTC by Ondrej Danek
Modified: 2014-07-14 06:25 UTC (History)
1 user (show)

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Ondrej Danek 2006-06-27 14:53:06 UTC
Many users have complained to me that their joysticks are not detected in my SDL app when they run it under Windows. I did some research on this and i think i have found the problem:

At line 170 in SDL_mmjoystick.c it says:
  result = joyGetPosEx(SYS_JoystickID[i], &joyinfo);
but if you look closer at the code you see that SDL_JoystickID[i] is always zero. So for example when their joystick is assigned to the second position in the windows "driver" and the first position is empty, then it is never detected, because it always returns JOYERR_UNPLUGGED.

I believe this line should look like this:
  result = joyGetPosEx(i, &joyinfo);
Comment 1 Ryan C. Gordon 2006-10-28 23:43:53 UTC
This patch is in Subversion now (revision #2888 for 1.2 branch, revision #2889 for 1.3 branch).

Thanks!

--ryan.