projects
/
rocksndiamonds.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
fixed handling global animation key actions when mouse button is pressed
[rocksndiamonds.git]
/
src
/
events.c
diff --git
a/src/events.c
b/src/events.c
index 8279f70fb223bba859d2203823528650d7b40ef4..9348533aaeed0e42d6e0f4a8107de44db1805c37 100644
(file)
--- a/
src/events.c
+++ b/
src/events.c
@@
-74,6
+74,9
@@
static int FilterEvents(const Event *event)
{
((MotionEvent *)event)->x -= video.screen_xoffset;
((MotionEvent *)event)->y -= video.screen_yoffset;
{
((MotionEvent *)event)->x -= video.screen_xoffset;
((MotionEvent *)event)->y -= video.screen_yoffset;
+
+ gfx.mouse_x = ((MotionEvent *)event)->x;
+ gfx.mouse_y = ((MotionEvent *)event)->y;
}
// non-motion events are directly passed to event handler functions
}
// non-motion events are directly passed to event handler functions
@@
-1016,6
+1019,8
@@
void HandleFingerEvent(FingerEvent *event)
event->pressure);
#endif
event->pressure);
#endif
+ runtime.uses_touch_device = TRUE;
+
if (game_status != GAME_MODE_PLAYING)
return;
if (game_status != GAME_MODE_PLAYING)
return;
@@
-1740,7
+1745,7
@@
void HandleButton(int mx, int my, int button, int button_nr)
!virtual_button_pressed));
#endif
!virtual_button_pressed));
#endif
- if (HandleGlobalAnimClicks(mx, my, button))
+ if (HandleGlobalAnimClicks(mx, my, button
, FALSE
))
{
// do not handle this button event anymore
return; // force mouse event not to be handled at all
{
// do not handle this button event anymore
return; // force mouse event not to be handled at all
@@
-2244,7
+2249,7
@@
void HandleKey(Key key, int key_status)
if (HandleGlobalAnimClicks(-1, -1, (key == KSYM_space ||
key == KSYM_Return ||
if (HandleGlobalAnimClicks(-1, -1, (key == KSYM_space ||
key == KSYM_Return ||
- key == KSYM_Escape)))
+ key == KSYM_Escape)
, TRUE
))
{
// do not handle this key event anymore
if (key != KSYM_Escape) // always allow ESC key to be handled
{
// do not handle this key event anymore
if (key != KSYM_Escape) // always allow ESC key to be handled
@@
-2555,7
+2560,7
@@
void HandleJoystick(void)
int dy = (up ? -1 : down ? 1 : 0);
boolean use_delay_value_first = (joytest != joytest_last);
int dy = (up ? -1 : down ? 1 : 0);
boolean use_delay_value_first = (joytest != joytest_last);
- if (HandleGlobalAnimClicks(-1, -1, newbutton))
+ if (HandleGlobalAnimClicks(-1, -1, newbutton
, FALSE
))
{
// do not handle this button event anymore
return;
{
// do not handle this button event anymore
return;