[Subject Prev][Subject Next][Thread Prev][Thread Next][Subject Index][Thread Index]

Re: Joystick Programming in Linux



Krishnan P S wrote:
> 
> hi
> i'd like some sound guidance on joystick programming in c on Linux.
> i see that in dos its pretty easy using the joystick registers 0x201,
> but the sample i have for linux has asm for the job. is it ONLY THRU
> ASM? is there any other lib or mthd in c ?
> pls assist asap

I don't think you want to write programs that directly talk to your joystick under Linux.First you
have to get the joystick drivers for Linux.Check out www.linuxgames.com/joystick/ and see whether
your joystick is supported.Get the drivers and you may have to Recompile your kernel.I'm not sure
whether joystick drivers are already there with your kernel.

  Assuming that you want to use your joystick for a graphics program you might want to look at SDL 
http://www.devolution.com/~slouken/projects/SDL/index.html 
a C library for doing drawing stuff under Linux without having to know any X programming.It has
simple functions for joystick which is all you have to use.

---
Send e-mail to 'ilugc-request@xxxxxxxxxxxxxxxxxx' with 'unsubscribe' 
in either the subject or the body to unsubscribe from this list.