summaryrefslogtreecommitdiff
path: root/emulators/xmess/patches/patch-af
blob: 4421fa9076d79896ecf5ff2e4b3b91a65eda5fc1 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
$NetBSD: patch-af,v 1.4 2005/11/17 19:54:09 joerg Exp $

--- src/unix/joystick-drivers/joy_standard.c.orig	2005-11-17 16:17:48.000000000 +0000
+++ src/unix/joystick-drivers/joy_standard.c
@@ -6,7 +6,7 @@ static int use_old_driver = 0;
 
 struct rc_option joy_standard_opts[] = {
    /* name, shortname, type, dest, deflt, min, max, func, help */
-#if defined(__ARCH_netbsd) || defined(__ARCH_freebsd) || defined(__ARCH_openbsd)
+#if defined(__ARCH_netbsd) || defined(__ARCH_freebsd) || defined(__ARCH_openbsd) || defined(__ARCH_dragonfly)
    { "joydevname",	"jdev",			rc_string,	&joy_dev,
      "/dev/joy",	0,			0,		NULL,
      "Joystick device prefix (defaults to /dev/joy)" },
@@ -29,7 +29,7 @@ struct rc_option joy_standard_opts[] = {
 #include <sys/ioctl.h>
 
 /* specific joystick for PC clones */
-#if defined(__ARCH_netbsd) || defined(__ARCH_freebsd) || defined(__ARCH_openbsd)
+#if defined(__ARCH_netbsd) || defined(__ARCH_freebsd) || defined(__ARCH_openbsd) || defined(__ARCH_dragonfly)
 
 #include <machine/joystick.h>
 typedef struct joystick joy_struct;
@@ -142,7 +142,7 @@ void joy_standard_init(void)
 					/* fall through to the next case */
 				case 1:
 					joy_data[i].num_axes = 2;
-#if defined(__ARCH_netbsd) || defined(__ARCH_freebsd) || defined(__ARCH_openbsd)
+#if defined(__ARCH_netbsd) || defined(__ARCH_freebsd) || defined(__ARCH_openbsd) || defined(__ARCH_dragonfly)
 					joy_data[i].num_buttons = 2;
 #else
 					joy_data[i].num_buttons = JOY_BUTTONS;
@@ -217,7 +217,7 @@ void joy_standard_poll(void)
 			continue;
 
 		/* get value of buttons */
-#if defined(__ARCH_netbsd) || defined(__ARCH_freebsd) || defined(__ARCH_openbsd)
+#if defined(__ARCH_netbsd) || defined(__ARCH_freebsd) || defined(__ARCH_openbsd) || defined(__ARCH_dragonfly)
 		joy_data[i].buttons[0] = my_joy_data.b1;
 		joy_data[i].buttons[1] = my_joy_data.b2;
 #else