aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authordenis2017-03-15 17:40:45 +0100
committerRémi Verschelde2017-03-19 00:42:58 +0100
commite3e86567ba7fa12092ae78b88a31e966b2338310 (patch)
tree59b35dbe55d5d287f0650287c784e0523236ab9c
parent10119f7b0411a78eb42b77d13cd0ddeeb4af593b (diff)
downloadgodot-e3e86567ba7fa12092ae78b88a31e966b2338310.tar.gz
godot-e3e86567ba7fa12092ae78b88a31e966b2338310.tar.zst
godot-e3e86567ba7fa12092ae78b88a31e966b2338310.zip
Update mouse position on touch and release events (Android)
(cherry picked from commit 55835167a4bf88d67b1c5d80bda606a57b919555)
-rw-r--r--platform/android/os_android.cpp2
1 files changed, 2 insertions, 0 deletions
diff --git a/platform/android/os_android.cpp b/platform/android/os_android.cpp
index 3f80636c5..b2f823aaa 100644
--- a/platform/android/os_android.cpp
+++ b/platform/android/os_android.cpp
@@ -435,6 +435,7 @@ void OS_Android::process_touch(int p_what, int p_pointer, const Vector<TouchPos>
ev.mouse_button.y = touch[0].pos.y;
ev.mouse_button.global_x = touch[0].pos.x;
ev.mouse_button.global_y = touch[0].pos.y;
+ input->set_mouse_pos(Point2(touch[0].pos.x,touch[0].pos.y));
last_mouse = touch[0].pos;
input->parse_input_event(ev);
}
@@ -517,6 +518,7 @@ void OS_Android::process_touch(int p_what, int p_pointer, const Vector<TouchPos>
ev.mouse_button.y = touch[0].pos.y;
ev.mouse_button.global_x = touch[0].pos.x;
ev.mouse_button.global_y = touch[0].pos.y;
+ input->set_mouse_pos(Point2(touch[0].pos.x,touch[0].pos.y));
input->parse_input_event(ev);
for (int i = 0; i < touch.size(); i++) {