summaryrefslogtreecommitdiff
path: root/emulators/xmame/patches/patch-ag
diff options
context:
space:
mode:
Diffstat (limited to 'emulators/xmame/patches/patch-ag')
-rw-r--r--emulators/xmame/patches/patch-ag36
1 files changed, 36 insertions, 0 deletions
diff --git a/emulators/xmame/patches/patch-ag b/emulators/xmame/patches/patch-ag
new file mode 100644
index 00000000000..67c2b4650f8
--- /dev/null
+++ b/emulators/xmame/patches/patch-ag
@@ -0,0 +1,36 @@
+$NetBSD: patch-ag,v 1.4 2005/11/17 19:55:55 joerg Exp $
+
+--- src/unix/joystick-drivers/joy_usb.c.orig 2005-11-17 16:19:51.000000000 +0000
++++ src/unix/joystick-drivers/joy_usb.c
+@@ -22,7 +22,7 @@ struct rc_option joy_usb_opts[] = {
+ #ifdef USB_JOYSTICK
+
+
+-#if !defined(__ARCH_openbsd) && !defined(__ARCH_netbsd) && !defined(__ARCH_freebsd)
++#if !defined(__ARCH_openbsd) && !defined(__ARCH_netbsd) && !defined(__ARCH_freebsd) && !defined(__ARCH_dragonfly)
+ #error "USB joysticks are only supported under OpenBSD, NetBSD and FreeBSD. Patches to support other archs are welcome ;)"
+ #endif
+
+@@ -47,8 +47,13 @@ struct rc_option joy_usb_opts[] = {
+ #include <sys/ioctl.h>
+ #endif
+
++#ifdef __ARCH_dragonfly
++#include <bus/usb/usb.h>
++#include <bus/usb/usbhid.h>
++#else
+ #include <dev/usb/usb.h>
+ #include <dev/usb/usbhid.h>
++#endif
+
+ int axis_usage[] = {
+ HUG_X, HUG_Y, HUG_Z,
+@@ -118,7 +123,7 @@ static int joy_initialize_hid(int i)
+ }
+
+ #if defined(HAVE_USBHID_H) || defined(HAVE_LIBUSBHID_H)
+-#if defined(__ARCH_openbsd) || defined(__ARCH_netbsd) || (defined(__ARCH_freebsd) && __FreeBSD_version > 500000)
++#if defined(__ARCH_openbsd) || defined(__ARCH_netbsd) || (defined(__ARCH_freebsd) && __FreeBSD_version > 500000) || defined(__ARCH_dragonfly)
+ if (ioctl(joy_data[i].fd, USB_GET_REPORT_ID, &report_id) < 0)
+ {
+ fprintf(stderr_file, "error: /dev/uhid%d: %s", i, strerror(errno));