added unpausing tape by key or mouse button for appropriate tape mode
authorHolger Schemel <info@artsoft.org>
Wed, 29 Mar 2017 17:57:15 +0000 (19:57 +0200)
committerHolger Schemel <info@artsoft.org>
Fri, 23 Mar 2018 22:21:11 +0000 (23:21 +0100)
src/events.c

index b30159555f124225f1526a46778befe0bf8c6a47..18898fb2c8e1401c1a97d76580b6ddfc1a849914 100644 (file)
@@ -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)