projects
/
rocksndiamonds.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
added option 'off' for touch controls (for non-Android platforms)
[rocksndiamonds.git]
/
src
/
events.c
diff --git
a/src/events.c
b/src/events.c
index 0fd37032ba306f436f8be3ebcc0a4edb79a8f00c..c7707c2f6f9fcc7c3904003cac863a518fd66243 100644
(file)
--- a/
src/events.c
+++ b/
src/events.c
@@
-676,7
+676,7
@@
void HandleFingerEvent(FingerEvent *event)
if (game_status != GAME_MODE_PLAYING)
return;
if (game_status != GAME_MODE_PLAYING)
return;
- if (strEqual(setup.touch.control_type, TOUCH_CONTROL_
FOLLOW_FINGER
))
+ if (strEqual(setup.touch.control_type, TOUCH_CONTROL_
OFF
))
return;
if (strEqual(setup.touch.control_type, TOUCH_CONTROL_VIRTUAL_BUTTONS))
return;
if (strEqual(setup.touch.control_type, TOUCH_CONTROL_VIRTUAL_BUTTONS))
@@
-824,6
+824,9
@@
void HandleFingerEvent(FingerEvent *event)
return;
}
return;
}
+ if (!strEqual(setup.touch.control_type, TOUCH_CONTROL_WIPE_GESTURES))
+ return;
+
// use touch direction control
if (event->type == EVENT_FINGERPRESS)
// use touch direction control
if (event->type == EVENT_FINGERPRESS)
@@
-1931,6
+1934,15
@@
void HandleKey(Key key, int key_status)
void HandleNoEvent()
{
HandleMouseCursor();
void HandleNoEvent()
{
HandleMouseCursor();
+
+ switch (game_status)
+ {
+#if defined(TARGET_SDL2)
+ case GAME_MODE_PLAYING:
+ HandleFollowFinger(-1, -1, -1);
+ break;
+#endif
+ }
}
void HandleEventActions()
}
void HandleEventActions()
@@
-1962,12
+1974,6
@@
void HandleEventActions()
HandleLevelEditorIdle();
break;
HandleLevelEditorIdle();
break;
-#if defined(TARGET_SDL2)
- case GAME_MODE_PLAYING:
- HandleFollowFinger(-1, -1, -1);
- break;
-#endif
-
default:
break;
}
default:
break;
}