pkgsrc/games/rocksndiamonds/patches/patch-ak
adam d8b79bf554 Changes 3.2.4:
* fixed crash bug in toon drawing functions for large step offset values
* fixed some problems with displaying game panel when quick-loading tape
* fixed (experimental only) redrawing of every tile per frame (even if
  unneeded) for the extended (R'n'D based) EMC graphics engine
* added optimization to only calculate element count for panel display
  if really needed (that is, if element count values defined on panel)
* fixed problem with special editor door redraw when entering main menu
* fixed bug with displaying background for title messages on info screen
* some code cleanup for the extended (R'n'D based) EMC graphics engine
* fixed bug with CE action "move player" always resulting in player 4
  if there was a CE action with no trigger player (because the player
  element was calculated by using log_2() from trigger player bits with
  the value PLAYER_BITS_ANY) -- this is now fixed by also storing the
  triggering player bit mask and handling all players in "move player"
* fixed bug when defined artwork cannot be found for artwork that has
  default artwork cloned from other artwork (without default filename)
* added several fixes to the extended (R'n'D based) EMC graphics engine
* fixed broken editor copy and paste for custom elements between levels
2007-10-13 12:58:47 +00:00

22 lines
820 B
Text

$NetBSD: patch-ak,v 1.7 2007/10/13 12:58:48 adam Exp $
--- src/libgame/system.c.orig 2007-09-03 21:27:29.000000000 +0200
+++ src/libgame/system.c
@@ -1457,10 +1457,14 @@ void InitJoysticks()
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();