projects
/
rocksndiamonds.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
added setting engine snapshot mode to setup screen and file
[rocksndiamonds.git]
/
src
/
events.c
diff --git
a/src/events.c
b/src/events.c
index d599dde4ba1ee695dcd450730cb23da75074bdef..42277b02e6c1947d5e0176b11657638aa68a7e49 100644
(file)
--- 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;
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;
if (button < 0)
{
mx = old_mx;
my = old_my;
button = -button;
+ button_hold = TRUE;
}
else
{
}
else
{
@@
-946,6
+948,7
@@
void HandleButton(int mx, int my, int button, int button_nr)
}
#if defined(PLATFORM_ANDROID)
}
#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))
{
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
}
#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;
/* 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()
{
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);
}
{
HandleButton(0, 0, -button_status, button_status);
}