summaryrefslogtreecommitdiff
path: root/emulators/uae/patches/patch-ad
blob: 86916b18c48a557ae30ffe612de2511ea2a6ac7a (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
$NetBSD: patch-ad,v 1.1 2001/05/31 21:38:52 kristerw Exp $
--- src/od-linux/joystick.c.bak	Wed Apr 15 21:30:16 1998
+++ src/od-linux/joystick.c	Thu May 31 23:19:06 2001
@@ -17,12 +17,12 @@
 #include "custom.h"
 #include "joystick.h"
 
-#ifdef HAVE_MACHINE_SOUNDCARD_H
+#ifdef HAVE_MACHINE_JOYSTICK_H
 
 /* The BSD way.  */
 
-# include <machine/soundcard.h>
-typedef struct joystick uae_joystick_t
+# include <machine/joystick.h>
+typedef struct joystick uae_joystick_t;
 
 #define JS_DEVNAME_PREFIX "joy"
 
@@ -84,7 +84,11 @@
     if (left) top = !top;
     if (right) bot = !bot;
     *dir = bot | (right << 1) | (top << 8) | (left << 9);
+#ifdef HAVE_MACHINE_JOYSTICK_H
+    *button = buffer.b1 || buffer.b2;
+#else
     *button = buffer.buttons & 3;
+#endif
 }
 
 void init_joystick(void)