[freespace2] Linux joystick code

Alan Swanson swanson at ukfsn.org
Mon Dec 15 07:14:54 EST 2003


On Mon, 2003-12-15 at 04:09, Karl Robillard wrote:
> My joystick is a Cyborg EVO and the driver is joydev installed without 
> parameters. SDL is v1.2.5 and I've tried setting SDL_LINUX_JOYSTICK to 
> various things (export SDL_LINUX_JOYSTICK="/dev/js0 6 1 0", etc.) with no 
> change in results.

As Taylor said, your SDL_LINUX_JOYSTICK is incorrect.

You didn't say what driver you use (joydev is an interface, not a
driver), but I presume it uses hid as it's a USB device? In which
case, you would be better using the evdev interface.

However, SDL 1.2.5 will use the joystick before the event interface
and depending on your distribution might not have event support
compiled. Either try with evdev only (unload joydev), or try SDL
1.2.6 with event support compiled in.

> Regardless if you fix the SDL problem or not, I would still ask that the 
> joy-linux.cpp file be added to the repository as an example for others of how 
> to use the native Linux joystick API.

Thats up to Dan, but I think your patch is unneeded.

People know how to use the joystick interface as its been around
forever! Set it up correctly for SDL and all the other games will
also work without having to add joystick code to each game.

The joystick interface is being replaced by event interface. (Though
it could stll do with a calibration method :-)

-- 
Alan.

"One must never be purposelessnessnesslessness."
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 189 bytes
Desc: This is a digitally signed message part
URL: <http://icculus.org/pipermail/freespace2/attachments/20031215/c2759c79/attachment.pgp>


More information about the freespace2 mailing list