X-Git-Url: https://git.artsoft.org/?a=blobdiff_plain;f=src%2Fevents.c;h=42277b02e6c1947d5e0176b11657638aa68a7e49;hb=f6bcc10ce7b517f04eb5cddf01c9ec29ee729b7e;hp=d599dde4ba1ee695dcd450730cb23da75074bdef;hpb=1c428c3e9e9625ec4a0fbec9129138baf3cf8a63;p=rocksndiamonds.git diff --git a/src/events.c b/src/events.c index d599dde4..42277b02 100644 --- a/src/events.c +++ b/src/events.c @@ -932,12 +932,14 @@ void HandleWindowManagerEvent(Event *event) void HandleButton(int mx, int my, int button, int button_nr) { static int old_mx = 0, old_my = 0; + boolean button_hold = FALSE; if (button < 0) { mx = old_mx; my = old_my; button = -button; + button_hold = TRUE; } else { @@ -946,6 +948,7 @@ void HandleButton(int mx, int my, int button, int button_nr) } #if defined(PLATFORM_ANDROID) + // !!! for now, do not handle gadgets when playing -- maybe fix this !!! if (game_status != GAME_MODE_PLAYING && HandleGadgets(mx, my, button)) { @@ -960,6 +963,9 @@ void HandleButton(int mx, int my, int button, int button_nr) } #endif + if (button_hold && game_status == GAME_MODE_PLAYING && tape.pausing) + return; + /* do not use scroll wheel button events for anything other than gadgets */ if (IS_WHEEL_BUTTON(button_nr)) return; @@ -1595,7 +1601,8 @@ void HandleKey(Key key, int key_status) void HandleNoEvent() { - if (button_status && game_status != GAME_MODE_PLAYING) + // if (button_status && game_status != GAME_MODE_PLAYING) + if (button_status && (game_status != GAME_MODE_PLAYING || tape.pausing)) { HandleButton(0, 0, -button_status, button_status); }