projects
/
rocksndiamonds.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
|
inline
| side by side (parent:
9e02f2a
)
fixed handling gadgets when touch controls are disabled on Android
author
Holger Schemel
<info@artsoft.org>
Sun, 1 May 2022 18:12:13 +0000
(20:12 +0200)
committer
Holger Schemel
<info@artsoft.org>
Sun, 1 May 2022 18:13:19 +0000
(20:13 +0200)
src/events.c
patch
|
blob
|
history
diff --git
a/src/events.c
b/src/events.c
index 35f08ad0feea2b452b3759ac20b7ced8212d2aa2..d5f9963bd00a7a658b0a2029afa852d1c03a38e0 100644
(file)
--- a/
src/events.c
+++ b/
src/events.c
@@
-1718,9
+1718,11
@@
void HandleButton(int mx, int my, int button, int button_nr)
// when playing, only handle gadgets when using "follow finger" controls
// or when using touch controls in combination with the MM game engine
// or when using gadgets that do not overlap with virtual buttons
// when playing, only handle gadgets when using "follow finger" controls
// or when using touch controls in combination with the MM game engine
// or when using gadgets that do not overlap with virtual buttons
+ // or when touch controls are disabled (e.g., with mouse-only levels)
handle_gadgets =
(game_status != GAME_MODE_PLAYING ||
level.game_engine_type == GAME_ENGINE_TYPE_MM ||
handle_gadgets =
(game_status != GAME_MODE_PLAYING ||
level.game_engine_type == GAME_ENGINE_TYPE_MM ||
+ strEqual(setup.touch.control_type, TOUCH_CONTROL_OFF) ||
strEqual(setup.touch.control_type, TOUCH_CONTROL_FOLLOW_FINGER) ||
(strEqual(setup.touch.control_type, TOUCH_CONTROL_VIRTUAL_BUTTONS) &&
!CheckVirtualButtonPressed(mx, my, button)));
strEqual(setup.touch.control_type, TOUCH_CONTROL_FOLLOW_FINGER) ||
(strEqual(setup.touch.control_type, TOUCH_CONTROL_VIRTUAL_BUTTONS) &&
!CheckVirtualButtonPressed(mx, my, button)));