From bad67e8c9c6b1ba51f001b2a3f79e059e3e2e786 Mon Sep 17 00:00:00 2001 From: Holger Schemel Date: Wed, 29 Mar 2017 19:57:15 +0200 Subject: [PATCH] added unpausing tape by key or mouse button for appropriate tape mode --- src/events.c | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) 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) -- 2.34.1