fixed include bug when no joystick is connected
This commit is contained in:
parent
c4e053c617
commit
c62769c583
|
@ -216,15 +216,19 @@ void display_loop(){
|
||||||
#else
|
#else
|
||||||
|
|
||||||
case 42:
|
case 42:
|
||||||
|
#ifdef JOYSTICK_SUPPORT
|
||||||
if (JOYISFIRE)
|
if (JOYISFIRE)
|
||||||
mode = 43;
|
mode = 43;
|
||||||
else
|
else
|
||||||
|
#endif
|
||||||
mode = 1;
|
mode = 1;
|
||||||
break;
|
break;
|
||||||
|
|
||||||
case 43:
|
case 43:
|
||||||
|
#ifdef JOYSTICK_SUPPORT
|
||||||
waitForFire = 0; // avoid circular jumps
|
waitForFire = 0; // avoid circular jumps
|
||||||
while (JOYISFIRE); // wait until user released the fire button
|
while (JOYISFIRE); // wait until user released the fire button
|
||||||
|
#endif
|
||||||
wait(25); // wait for button to settle
|
wait(25); // wait for button to settle
|
||||||
|
|
||||||
# ifdef GAME_TETRIS
|
# ifdef GAME_TETRIS
|
||||||
|
@ -251,10 +255,14 @@ void display_loop(){
|
||||||
borg_breakout(0);
|
borg_breakout(0);
|
||||||
# endif
|
# endif
|
||||||
|
|
||||||
|
#ifdef JOYSTICK_SUPPORT
|
||||||
while (JOYISFIRE); // avoid an unwanted restart of the game loop
|
while (JOYISFIRE); // avoid an unwanted restart of the game loop
|
||||||
|
#endif
|
||||||
wait(25); // wait for button to settle
|
wait(25); // wait for button to settle
|
||||||
mode = oldOldmode; // restore old animation mode
|
mode = oldOldmode; // restore old animation mode
|
||||||
|
#ifdef JOYSTICK_SUPPORT
|
||||||
waitForFire = 1; // reenable joystick query of the wait() function
|
waitForFire = 1; // reenable joystick query of the wait() function
|
||||||
|
#endif
|
||||||
break;
|
break;
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue