X-Git-Url: https://git.artsoft.org/?p=rocksndiamonds.git;a=blobdiff_plain;f=src%2Fevents.c;h=7a3f9987d4b09a80ebdc48c970c8eb118f3b4727;hp=c40075e4d375faa0157249fbd68e9d909ba26b41;hb=310781167f731177d6d46b15093dc32606eeac4e;hpb=84b00c096ac7311cd019cc84969ff2d88353b3fa diff --git a/src/events.c b/src/events.c index c40075e4..7a3f9987 100644 --- 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 new_button = (!local_player->mouse_action.button && button); ClearPlayerMouseAction(); @@ -413,10 +414,12 @@ void SetPlayerMouseAction(int mx, int my, int 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); + /* un-pause a paused game only if mouse button was newly pressed down */ + if (new_button) + TapeTogglePause(TAPE_TOGGLE_AUTOMATIC); } + + SetTileCursorXY(lx, ly); } void SleepWhileUnmapped() @@ -2340,7 +2343,12 @@ void HandleJoystick() 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);