89607e2002
- added tutorial level set created by Aaron Davidson - added editor element descriptions written by Aaron Davidson - added native game engine for Emerald Mine (Club) levels - added level skipping functionality to main menu - added support for dumping small-sized level sketches from editor - added use of "editorsetup.conf" for different level sets - lots of bugfixes and internal engine changes (see ChangeLog)
38 lines
1.2 KiB
Text
38 lines
1.2 KiB
Text
$NetBSD: patch-ag,v 1.4 2005/08/16 15:35:51 adam Exp $
|
|
|
|
--- src/libgame/joystick.c.orig 2005-07-23 19:10:58.000000000 +0000
|
|
+++ src/libgame/joystick.c
|
|
@@ -11,12 +11,13 @@
|
|
* joystick.c *
|
|
***********************************************************/
|
|
|
|
-#if defined(PLATFORM_FREEBSD)
|
|
+#include "misc.h"
|
|
+
|
|
+#if defined(PLATFORM_FREEBSD) || (defined(PLATFORM_NETBSD) && defined(HAVE_JOYSTICK))
|
|
#include <machine/joystick.h>
|
|
#endif
|
|
|
|
#include "joystick.h"
|
|
-#include "misc.h"
|
|
|
|
|
|
/* ========================================================================= */
|
|
@@ -68,7 +69,7 @@ void UnixInitJoysticks()
|
|
|
|
boolean UnixReadJoystick(int fd, int *x, int *y, boolean *b1, boolean *b2)
|
|
{
|
|
-#if defined(PLATFORM_FREEBSD)
|
|
+#if defined(PLATFORM_FREEBSD) || (defined(PLATFORM_NETBSD) && defined(HAVE_JOYSTICK))
|
|
struct joystick joy_ctrl;
|
|
#else
|
|
struct joystick_control
|
|
@@ -87,7 +88,7 @@ boolean UnixReadJoystick(int fd, int *x,
|
|
if (y != NULL)
|
|
*y = joy_ctrl.y;
|
|
|
|
-#if defined(PLATFORM_FREEBSD)
|
|
+#if defined(PLATFORM_FREEBSD) || (defined(PLATFORM_NETBSD) && defined(HAVE_JOYSTICK))
|
|
if (b1 != NULL)
|
|
*b1 = joy_ctrl.b1;
|
|
if (b2 != NULL)
|