summaryrefslogtreecommitdiff
path: root/games/bzflag/files/patch-usbjoy.cxx
diff options
context:
space:
mode:
authorWill Andrews <will@FreeBSD.org>2002-09-19 03:38:11 +0000
committerWill Andrews <will@FreeBSD.org>2002-09-19 03:38:11 +0000
commit6c59244964fca3e1b79953ed1097381c910ce8c8 (patch)
tree8c6b911a76653d6b24f2ebe3ede015ac84b055a7 /games/bzflag/files/patch-usbjoy.cxx
parentBROKEN: Does not fetch (diff)
Fix bzflag and remove BROKEN. This has been broken since joe MFC'd the
change from libusb.h to libusbhid.h at least, which is five months. The patch committed here may not be correct, but it compiles and I don't have a USB joystick to test with, and 4.7-R ports freeze is in two days...
Notes
Notes: svn path=/head/; revision=66676
Diffstat (limited to '')
-rw-r--r--games/bzflag/files/patch-usbjoy.cxx29
1 files changed, 26 insertions, 3 deletions
diff --git a/games/bzflag/files/patch-usbjoy.cxx b/games/bzflag/files/patch-usbjoy.cxx
index 747f862c60c3..e0b4e59eaa45 100644
--- a/games/bzflag/files/patch-usbjoy.cxx
+++ b/games/bzflag/files/patch-usbjoy.cxx
@@ -1,6 +1,6 @@
---- src/platform/usbjoy.cxx.orig Thu Nov 15 02:27:11 2001
-+++ src/platform/usbjoy.cxx Sat Jan 26 05:48:50 2002
-@@ -46,7 +46,7 @@
+--- src/platform/usbjoy.cxx Wed Sep 18 22:28:34 2002
++++ src/platform/usbjoy.cxx.new Wed Sep 18 22:28:22 2002
+@@ -46,14 +46,14 @@
int data_buf_offset;
};
@@ -9,3 +9,26 @@
usb_joystick::usb_joystick(const char *name)
{
+ report_desc_t rd;
+ hid_data *d;
+ hid_item h;
+- int report_id;
++ hid_kind_t k;
+
+ status = FALSE;
+ hids = NULL;
+@@ -67,11 +67,12 @@
+ return;
+ }
+
+- data_buf_size = hid_report_size(rd, hid_input, &report_id);
++ k = hid_input;
++ data_buf_size = hid_report_size(rd, hid_input, k);
+ if ((data_buf = (char *)malloc(data_buf_size)) == NULL) {
+ hid_dispose_report_desc(rd);
+ }
+- data_buf_offset = (report_id != 0);
++ data_buf_offset = 0;
+
+ int is_joystick = 0;
+ int interesting_hid = FALSE;