Joystick code

Had trouble getting joystick recognized with sdl. Am using linux 2.4.
In order to get it to recognize joystick I have to ./configure
–disable-input-events.

Am noticed in src/linux/joystick/SDL_sysjoystick.c in function
SDL_SYS_JoystickInit() is like-----------------------------------------
const char *joydev_pattern[2] = {
"/dev!/js%d",
#ifdef USE_INPUT_EVENTS
"/dev/input/event%d"
#else
"/dev/input/js%d"
#endif
};

USE_INPUT_EVENTS is defined by default, unless you
–disable-joystick-events on configure. I guess what it does if its
defined is use /dev/input/eventX instead of /dev/input/jsX. WEll none
of my joysticks or gamepads work with /dev/input/event’s, only
/dev/input/js’es. Am not know if this is bug or not, since I not know
much about linux joystick api or how the new input interface in 2.4
works. But possible fix would be to remove the ifdef altogether and just
check both types of devices, cause not many people will know to pass
options to configure.

Had trouble getting joystick recognized with sdl. Am using linux 2.4.
In order to get it to recognize joystick I have to ./configure
–disable-input-events.

Thanks, I’m just disabling the event interface by default.
Most people have better luck with the normal joystick interface.

See ya!
-Sam Lantinga, Lead Programmer, Loki Software, Inc.