diff options
author | RĂ©mi Verschelde <rverschelde@gmail.com> | 2017-03-18 10:48:26 +0100 |
---|---|---|
committer | GitHub <noreply@github.com> | 2017-03-18 10:48:26 +0100 |
commit | 60bdc3705647e77658144ccf45b9f8a4f0808431 (patch) | |
tree | f7ec6b544663722641a07a8ad9a07e392cd12321 /platform/android | |
parent | e55b7fa7d0dc1e980a27a8d900a34c2b253789a8 (diff) | |
parent | 55835167a4bf88d67b1c5d80bda606a57b919555 (diff) |
Merge pull request #8035 from DenisComtesse/android-screentouch-fix
Update mouse position on touch and release events (Android)
Diffstat (limited to 'platform/android')
-rw-r--r-- | platform/android/os_android.cpp | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/platform/android/os_android.cpp b/platform/android/os_android.cpp index 60719f6d42..705f0df46e 100644 --- a/platform/android/os_android.cpp +++ b/platform/android/os_android.cpp @@ -421,6 +421,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); } @@ -503,6 +504,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++) { |