SDL requires the joystick to appear in /dev/jsX where X is a number 0-16
(possibly more too)
mandrake is not known for doing this for you, especially if you have a USB
joystick.
the best way to find a joystick under mandrake is to run the following
locate js0
or this
find /dev -name “js0”
then once you have found the joystick then link it to /dev/js0
example
ln -s /dev/input/js0 /dev/js0
If you are not sure which joystick you are using, then do this (in an Xterm or
other X based console if possible)
cat /dev/js0
then wiggle the joystick around, if your joystick is js0 then you should see
garbage appear on the screen.
hit
CTRL+C to end the program
if you get NO garbage then you’ve either got the wrong joystick drivers loaded
or you’ve tried to cat the wrong stick
with usb joysticks you must have
USB HID Module loaded (don’t know what it is called off the top of my head, as
I have it compiled into the kernel)
joystick.o
and
sidewinder.o (just like J.Grant said)
Also I’m attempting a robust joystick testing program in SDL, if you’d be so
kind as to give it a whack. it may be found here:
SDLJoytest
anyhow, hope that helped.
good luck
SamuelOn Tuesday 25 March 2003 11:40 am, Tyler Montbriand wrote:
I am attempting to get my Microsoft Sidewinder Freestyle Pro joystick
working with SDL under LINUX. My system is Mandrake 9.0 on an Athlon-1300,
with the joystick on a sbLive! gameport. I am using the following code for
testing:
int main(int argc, char *argv[])
{
if(SDL_Init(SDL_INIT_JOYSTICK)<0)
{
fprintf(stderr,“Can’t init SDL!\n”);
return(-1);
}
printf(“Joysticks: %d\n”,SDL_NumJoysticks());
SDL_Quit();
return(0);
}
No matter what I do, it prints ‘Joysticks: 0’. What combination of
modprobes, insmods, and rmmods do I need to get this silly thing working?
SDL mailing list
SDL at libsdl.org
http://www.libsdl.org/mailman/listinfo/sdl
–
"They that can give up essential liberty to obtain a little temporary safety
deserve neither liberty nor safety. "
–Benjamin Franklin