X-Git-Url: https://git.artsoft.org/?a=blobdiff_plain;f=src%2Fevents.c;h=9bd812373723cef124767d39028f4419dcfbbbdc;hb=7f77c2e8dcb7ad575fcaf89512f4f616846c8b41;hp=d42acf56eff9f1d436eef48395d162c97b1eaa9e;hpb=e05dda5c8cc6687dcbc59e182a81aed627e262d0;p=rocksndiamonds.git diff --git a/src/events.c b/src/events.c index d42acf56..9bd81237 100644 --- a/src/events.c +++ b/src/events.c @@ -245,7 +245,11 @@ void ClearEventQueue() break; case EVENT_KEYRELEASE: +#if 1 + ClearPlayerAction(); +#else key_joystick_mapping = 0; +#endif break; default: @@ -663,8 +667,18 @@ void HandleKey(Key key, int key_status) element_dropped[pnr] = FALSE; } } +#if 1 + else if (tape.recording && tape.pausing) + { + /* prevent key release events from un-pausing a paused game */ + if (key_status == KEY_PRESSED && + (key_action & KEY_ACTION)) + TapeTogglePause(TAPE_TOGGLE_MANUAL); + } +#else else if (tape.recording && tape.pausing && (key_action & KEY_ACTION)) TapeTogglePause(TAPE_TOGGLE_MANUAL); +#endif } } else @@ -700,8 +714,14 @@ void HandleKey(Key key, int key_status) return; } +#if 1 + if (game_status == GAME_MODE_PLAYING && + local_player->LevelSolved_GameEnd && + (key == KSYM_Return || key == setup.shortcut.toggle_pause)) +#else if (game_status == GAME_MODE_PLAYING && AllPlayersGone && (key == KSYM_Return || key == setup.shortcut.toggle_pause)) +#endif { GameEnd(); @@ -1045,7 +1065,11 @@ void HandleJoystick() if (tape.playing || keyboard) newbutton = ((joy & JOY_BUTTON) != 0); +#if 1 + if (local_player->LevelSolved_GameEnd && newbutton) +#else if (AllPlayersGone && newbutton) +#endif { GameEnd();