diff options
author | dillo <dillo@pkgsrc.org> | 2004-06-05 14:04:21 +0000 |
---|---|---|
committer | dillo <dillo@pkgsrc.org> | 2004-06-05 14:04:21 +0000 |
commit | 0cb76fd243b7fc261f9142e56f6485f9e652268a (patch) | |
tree | f836cca35779bfb7dc016a9497ca0538dd755024 /devel/SDL | |
parent | e86d8d2b6a5c8bb459a901565bacebbec72d6e37 (diff) | |
download | pkgsrc-0cb76fd243b7fc261f9142e56f6485f9e652268a.tar.gz |
USB joystick: number axes in usual order (X, Y, ...), not in order
returned by device. Makes joysticks that return Z before X usable.
Diffstat (limited to 'devel/SDL')
-rw-r--r-- | devel/SDL/Makefile | 3 | ||||
-rw-r--r-- | devel/SDL/distinfo | 4 | ||||
-rw-r--r-- | devel/SDL/patches/patch-aa | 43 |
3 files changed, 44 insertions, 6 deletions
diff --git a/devel/SDL/Makefile b/devel/SDL/Makefile index 40612d6f089..045d1a0e3e9 100644 --- a/devel/SDL/Makefile +++ b/devel/SDL/Makefile @@ -1,7 +1,8 @@ -# $NetBSD: Makefile,v 1.54 2004/02/14 17:21:36 jlam Exp $ +# $NetBSD: Makefile,v 1.55 2004/06/05 14:04:21 dillo Exp $ # PKG_INSTALLATION_TYPES= overwrite pkgviews +PKGREVISION=1 .include "Makefile.common" .include "../../mk/bsd.pkg.mk" diff --git a/devel/SDL/distinfo b/devel/SDL/distinfo index 8f2ae2c75d3..4de1227656d 100644 --- a/devel/SDL/distinfo +++ b/devel/SDL/distinfo @@ -1,8 +1,8 @@ -$NetBSD: distinfo,v 1.27 2004/04/17 00:15:21 snj Exp $ +$NetBSD: distinfo,v 1.28 2004/06/05 14:04:21 dillo Exp $ SHA1 (SDL-1.2.7.tar.gz) = 1a840c50668f230df9e9163ef1a282d9f3355383 Size (SDL-1.2.7.tar.gz) = 2470936 bytes -SHA1 (patch-aa) = 4511f3af35b824d8e1425b571a8c12e44e8ef46c +SHA1 (patch-aa) = cf5b703aa2ea4c047cfd5ea93b4687382e667b27 SHA1 (patch-ab) = 7effcc7f7f1856372692c147521888843810fed5 SHA1 (patch-af) = f5e824addf308f9c467de02e3b262afbc0ef77c0 SHA1 (patch-aj) = 02705ec01b70cbfef6520586d799dccd835352dc diff --git a/devel/SDL/patches/patch-aa b/devel/SDL/patches/patch-aa index f386dc5361e..ec806e30833 100644 --- a/devel/SDL/patches/patch-aa +++ b/devel/SDL/patches/patch-aa @@ -1,8 +1,45 @@ -$NetBSD: patch-aa,v 1.5 2003/09/03 19:30:53 drochner Exp $ +$NetBSD: patch-aa,v 1.6 2004/06/05 14:04:21 dillo Exp $ ---- src/joystick/bsd/SDL_sysjoystick.c.orig 2003-08-30 21:13:05.000000000 +0200 +--- src/joystick/bsd/SDL_sysjoystick.c.orig 2004-02-18 18:22:01.000000000 +0100 +++ src/joystick/bsd/SDL_sysjoystick.c -@@ -461,9 +461,9 @@ report_alloc(struct report *r, struct re +@@ -238,6 +238,7 @@ SDL_SYS_JoystickOpen(SDL_Joystick *joy) + struct hid_data *hdata; + struct report *rep; + int fd; ++ int i; + + fd = open(path, O_RDONLY); + if (fd == -1) { +@@ -302,6 +303,8 @@ SDL_SYS_JoystickOpen(SDL_Joystick *joy) + joy->nbuttons = 0; + joy->nhats = 0; + joy->nballs = 0; ++ for (i=0; i<JOYAXE_count; i++) ++ hw->axis_map[i] = -1; + + while (hid_get_item(hdata, &hitem) > 0) { + char *sp; +@@ -328,8 +331,7 @@ SDL_SYS_JoystickOpen(SDL_Joystick *joy) + unsigned usage = HID_USAGE(hitem.usage); + int joyaxe = usage_to_joyaxe(usage); + if (joyaxe >= 0) { +- hw->axis_map[joyaxe] = joy->naxes; +- joy->naxes++; ++ hw->axis_map[joyaxe] = 1; + } else if (usage == HUG_HAT_SWITCH) { + joy->nhats++; + } +@@ -347,6 +349,9 @@ SDL_SYS_JoystickOpen(SDL_Joystick *joy) + } + } + hid_end_parse(hdata); ++ for (i=0; i<JOYAXE_count; i++) ++ if (hw->axis_map[i] > 0) ++ hw->axis_map[i] = joy->naxes++; + + usbend: + /* The poll blocks the event thread. */ +@@ -529,9 +534,9 @@ report_alloc(struct report *r, struct re #endif #else # ifdef USBHID_NEW |