projects
/
rocksndiamonds.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
added support for compiling non-default Windows icons into the executable
[rocksndiamonds.git]
/
src
/
events.c
diff --git
a/src/events.c
b/src/events.c
index 08e571d17427f418b066613bde349cb57c747b6e..7a3f9987d4b09a80ebdc48c970c8eb118f3b4727 100644
(file)
--- a/
src/events.c
+++ b/
src/events.c
@@
-401,6
+401,7
@@
void SetPlayerMouseAction(int mx, int my, int button)
{
int lx = getLevelFromScreenX(mx);
int ly = getLevelFromScreenY(my);
{
int lx = getLevelFromScreenX(mx);
int ly = getLevelFromScreenY(my);
+ int new_button = (!local_player->mouse_action.button && button);
ClearPlayerMouseAction();
ClearPlayerMouseAction();
@@
-413,9
+414,9
@@
void SetPlayerMouseAction(int mx, int my, int button)
if (tape.recording && tape.pausing && tape.use_mouse)
{
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
);
+ /*
un-pause a paused game only if mouse button was newly pressed down
*/
+ if (
new_button
)
+ TapeTogglePause(TAPE_TOGGLE_
AUTOMATIC
);
}
SetTileCursorXY(lx, ly);
}
SetTileCursorXY(lx, ly);
@@
-2342,7
+2343,12
@@
void HandleJoystick()
return;
}
return;
}
- if (tape.recording && tape.pausing && !tape.use_mouse)
+ if (tape.single_step && tape.recording && tape.pausing && !tape.use_mouse)
+ {
+ if (joystick & JOY_ACTION)
+ TapeTogglePause(TAPE_TOGGLE_AUTOMATIC);
+ }
+ else if (tape.recording && tape.pausing && !tape.use_mouse)
{
if (joystick & JOY_ACTION)
TapeTogglePause(TAPE_TOGGLE_MANUAL);
{
if (joystick & JOY_ACTION)
TapeTogglePause(TAPE_TOGGLE_MANUAL);