summaryrefslogtreecommitdiff
path: root/games/rocksndiamonds/patches/patch-ak
diff options
context:
space:
mode:
Diffstat (limited to 'games/rocksndiamonds/patches/patch-ak')
-rw-r--r--games/rocksndiamonds/patches/patch-ak24
1 files changed, 24 insertions, 0 deletions
diff --git a/games/rocksndiamonds/patches/patch-ak b/games/rocksndiamonds/patches/patch-ak
new file mode 100644
index 00000000000..4d55e67a341
--- /dev/null
+++ b/games/rocksndiamonds/patches/patch-ak
@@ -0,0 +1,24 @@
+$NetBSD: patch-ak,v 1.1 2002/10/29 19:07:54 heinz Exp $
+
+--- src/libgame/system.c.orig Sat Aug 10 15:09:49 2002
++++ src/libgame/system.c
+@@ -874,10 +874,16 @@
+ return; /* joysticks generally deactivated by compile-time directive */
+ #endif
+
++ /* pkgsrc: InitJoystick will be called more than once, so reset
++ * the state variable 'joystick' only if there's no joystick available
++ * (yet).
++ */
+ /* always start with reliable default values */
+- joystick.status = JOYSTICK_NOT_AVAILABLE;
+- for (i=0; i<MAX_PLAYERS; i++)
+- joystick.fd[i] = -1; /* joystick device closed */
++ if (joystick.status == JOYSTICK_NOT_AVAILABLE)
++ {
++ for (i=0; i<MAX_PLAYERS; i++)
++ joystick.fd[i] = -1; /* joystick device closed */
++ }
+
+ #if defined(TARGET_SDL)
+ SDLInitJoysticks();