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 497 - Joystick detection fails when first joystick is not js0
Summary: Joystick detection fails when first joystick is not js0
Status: RESOLVED FIXED
Alias: None
Product: SDL
Classification: Unclassified
Component: joystick (show other bugs)
Version: 1.2.11
Hardware: x86 Linux
: P2 normal
Assignee: Ryan C. Gordon
QA Contact: Sam Lantinga
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2007-09-29 08:38 UTC by funkytune84
Modified: 2007-12-28 22:16 UTC (History)
0 users

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description funkytune84 2007-09-29 08:38:56 UTC
If the first joystick is not in /dev/input/js0 (which can happen if you plug in two joysticks, and then remove the first one, for example), then joystick detection fails for all subsequent joysticks (js1, js2, etc.)

Removing the "else break" at line 475-476 in SDL_sysjoystick.c (line number for the 1.2.11 file version) seems to solve the problem.
Comment 1 funkytune84 2007-09-29 08:42:14 UTC
That is, src/joystick/linux/SDL_sysjoystick.c
Comment 2 Sam Lantinga 2007-12-28 22:16:59 UTC
This is fixed with revision 3481.  Thanks!