projects
/
rocksndiamonds.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
|
inline
| side by side (parent:
ede9654
)
added unpausing tape by key or mouse button for appropriate tape mode
author
Holger Schemel
<info@artsoft.org>
Wed, 29 Mar 2017 17:57:15 +0000
(19:57 +0200)
committer
Holger Schemel
<info@artsoft.org>
Fri, 23 Mar 2018 22:21:11 +0000
(23:21 +0100)
src/events.c
patch
|
blob
|
history
diff --git
a/src/events.c
b/src/events.c
index b30159555f124225f1526a46778befe0bf8c6a47..18898fb2c8e1401c1a97d76580b6ddfc1a849914 100644
(file)
--- 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;
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()
}
void SleepWhileUnmapped()
@@
-1647,7
+1654,7
@@
void HandleKey(Key key, int key_status)
has_snapped[pnr] = FALSE;
}
}
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)
{
/* prevent key release events from un-pausing a paused game */
if (key_status == KEY_PRESSED && key_action & KEY_ACTION)