Subject: Re: Breaking binary compatibility for /dev/joy
To: Jared D. McNeill <firstname.lastname@example.org>
From: Jaromir Dolecek <email@example.com>
Date: 04/17/2002 09:42:27
> Would anybody horribly mind if I broke binary compatibility for
> applications that use /dev/joy*?
> I've added 4-button support to the analog joystick driver, but that
> required adding two more items to struct joystick (for the two extra
> Current applications should still be source compatible.
I was thinking about something like this too. However, is it
possible to find out if you have two joysticks or one joystick
with two axes and 4 buttons?
FWIW, you can get at the 'other' two buttons by reading /dev/joy1
I also think that it's better to use something like
int x, y, buttons;
rather than having a special member for each button. It'd be
fairly easy to have ioctl to switch between the two interfaces.
(One of the rare moments where Linux interface seems to be better).
Post 1.6, I'd like to have the joy(4) reorganized slightly,
especially make the include <machine/joystick.h> MI and deal
somehow with the 'joy0 is actually /dev/joy0 and /dev/joy1'
Jaromir Dolecek <firstname.lastname@example.org>
ARTISYS, s.r.o., Stursova 71, 61600 Brno, Czech Republic
phone: +420-5-41224836 / fax: +420-5-41224870 / http://www.artisys.cz