f78cf59978
* fixed crash bug when scrolling with cursor keys in editor * fixed X11 crash bug when scaling images with width/height less than 32 * fixed X11 crash bug when blitting masked title screens over background * fixed growing steel wall to also leave behind steel wall * fixed custom element change conditions where a player element is used * fixed bug with player relocation while the player switches an element * fixed problems with re-mapping players on playfield to input devices * fixed wrong behaviour of player option "no centering when relocating" * added condition "deadly when " for custom elements * added possibility to reanimate player immediately after his death * added "element used as action parameter" to element change actions * added optional initial inventory for players (pre-collected elements) * added change page actions "set player inventory" and "set CE artwork" * added switch for EM style dynamite "[ ] explodes with chain reaction" * moved "level settings" and "editor settings" to two tabbed screens * added level setting to start a level with always the same random seed * added CE action "set random seed" to re-initialize random seed in game
22 lines
820 B
Text
22 lines
820 B
Text
$NetBSD: patch-ak,v 1.8 2009/01/12 19:22:18 adam Exp $
|
|
|
|
--- src/libgame/system.c.orig 2008-01-25 22:25:33.000000000 +0100
|
|
+++ src/libgame/system.c
|
|
@@ -1494,10 +1494,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();
|