From: Holger Schemel Date: Wed, 29 Mar 2017 17:57:15 +0000 (+0200) Subject: added unpausing tape by key or mouse button for appropriate tape mode X-Git-Tag: 4.1.0.0~145 X-Git-Url: https://git.artsoft.org/?a=commitdiff_plain;h=bad67e8c9c6b1ba51f001b2a3f79e059e3e2e786;p=rocksndiamonds.git added unpausing tape by key or mouse button for appropriate tape mode --- diff --git a/src/events.c b/src/events.c index b3015955..18898fb2 100644 --- a/src/events.c +++ b/src/events.c @@ -403,6 +403,13 @@ void SetPlayerMouseAction(int mx, int my, int button) local_player->mouse_action.lx = lx; local_player->mouse_action.ly = ly; local_player->mouse_action.button = button; + + if (tape.recording && tape.pausing && tape.use_mouse) + { + /* prevent button release or motion events from un-pausing a paused game */ + if (button && !motion_status) + TapeTogglePause(TAPE_TOGGLE_MANUAL); + } } void SleepWhileUnmapped() @@ -1647,7 +1654,7 @@ void HandleKey(Key key, int key_status) has_snapped[pnr] = FALSE; } } - else if (tape.recording && tape.pausing) + else if (tape.recording && tape.pausing && !tape.use_mouse) { /* prevent key release events from un-pausing a paused game */ if (key_status == KEY_PRESSED && key_action & KEY_ACTION)