summaryrefslogtreecommitdiff
path: root/emulators/xmame/patches/patch-ab
diff options
context:
space:
mode:
authordillo <dillo@pkgsrc.org>2004-05-26 09:34:17 +0000
committerdillo <dillo@pkgsrc.org>2004-05-26 09:34:17 +0000
commit061ded3045382f7ca43f926ba766c3b1c02d39f5 (patch)
treed675ca3d059ab3b1edaf07e2819b6a90430db704 /emulators/xmame/patches/patch-ab
parentdfed217592a5d92d4b9e241b563da1fb4a2061cf (diff)
downloadpkgsrc-061ded3045382f7ca43f926ba766c3b1c02d39f5.tar.gz
Fix usb joystick driver for talkative joysticks: read all available
reports and use the newest one. Bump PKGREVISION.
Diffstat (limited to 'emulators/xmame/patches/patch-ab')
-rw-r--r--emulators/xmame/patches/patch-ab22
1 files changed, 22 insertions, 0 deletions
diff --git a/emulators/xmame/patches/patch-ab b/emulators/xmame/patches/patch-ab
new file mode 100644
index 00000000000..b99f63648c1
--- /dev/null
+++ b/emulators/xmame/patches/patch-ab
@@ -0,0 +1,22 @@
+$NetBSD: patch-ab,v 1.25 2004/05/26 09:34:17 dillo Exp $
+
+--- src/unix/joystick-drivers/joy_usb.c.orig Sun Mar 7 01:01:12 2004
++++ src/unix/joystick-drivers/joy_usb.c
+@@ -255,11 +255,14 @@ static void joy_usb_poll(void)
+
+ static int joy_read(int fd, int i)
+ {
+- int len, axis, usage, page, d;
++ int len, new, axis, usage, page, d;
+ struct hid_item *h;
+
+- len = read(fd, priv_joy_data[i].data_buf, priv_joy_data[i].dlen);
+- if (len != priv_joy_data[i].dlen)
++ new = 0;
++ while ((len=read(fd, priv_joy_data[i].data_buf, priv_joy_data[i].dlen))
++ == priv_joy_data[i].dlen)
++ new = 1;
++ if (!new)
+ return FALSE;
+
+ for (h = priv_joy_data[i].hids; h; h = h->next)