SDL to support /dev/joy? style gameport joysticks for NetBSD

I am using NetBSD/i386 1.6.1 with SDL-1.2.5 as installed via NetBSD
pkgsrc. My /dev/joy0 is not USB related. (It is at isapnp0.)

I tried defendguin (which I packaged) which uses SDL:

Warning: Could not open joystick 1.
The Simple DirectMedia error that occured was:
/dev/joy0: USB_GET_REPORT_DESC: Device not configured

SDL needs to support /dev/joy? style gameport joysticks in addition
to USB ones.

I found a patch for FreeBSD in their ports collection at

http://www.FreeBSD.org/cgi/cvsweb.cgi/ports/devel/sdl12/files/patch-joystick%3A%
3absd%3a%3aSDL_sysjoystick.c

For pkgsrc, I made a new patch based on that FreeBSD patch and on the
latest src/joystick/bsd/SDL_sysjoystick.c from libsdl CVS.

(This is recorded in NetBSD GNATS as NetBSD PR #22462.)

This patch is at
http://www.reedmedia.net/misc/tmp/SDL_sysjoystick.c-patch (9083 bytes)

Notice that the patch’s final “ifdef USBHID_NEW” section is reordered
based on OpenBSD ports and NetBSD’s pkgsrc (original patch-aa) patches.

This patch makes it so I can use my joystick. With another program
(rocksndiamonds), it seems like the joystick is calibrated fine. But with
SDL-based defendguin, I can’t get to all the menu choices and when playing
it moves to top and to the right. I can move around though and the buttons
are working.

Can someone look at this patch as linked above and test and improve it?

I’ll be glad to provide further testing.

Thank you,

Jeremy C. Reed
http://www.bsdnewsletter.com/

p.s. My son is going to be glad that he can play games with his joystick
now :slight_smile:

I didn’t receive any feedback on my patch. Nobody downloaded it either
(according to my web server logs).

Is there a bug reporting system available for SDL. A quick search for
gnats and bugzilla did not turn up anything.

Where do I submit patches?

Thank you,

Jeremy C. Reed
http://www.reedmedia.net/

I didn’t receive any feedback on my patch. Nobody downloaded it either
(according to my web server logs).

Is there a bug reporting system available for SDL.

The mailing list is it.

I’ll take a look at your patch when I get a chance.

Thanks!
-Sam Lantinga, Software Engineer, Blizzard Entertainment