Subject: Re: Breaking binary compatibility for /dev/joy
To: Jared D. McNeill <>
From: Jaromir Dolecek <>
List: tech-kern
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
> buttons).
> 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

 struct {
	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 <>
ARTISYS, s.r.o., Stursova 71, 61600 Brno, Czech Republic
phone: +420-5-41224836 / fax: +420-5-41224870 /