virtualx-engine/platform/android
Pedro J. Estébanez de9d40a953 Implement universal translation of touch to mouse
Now generating mouse events from touch is optional (on by default) and it's performed by `InputDefault` instead of having each OS abstraction doing it. (*)

The translation algorithm waits for a touch index to be pressed and tracks it translating its events to mouse events until it is raised, while ignoring other pointers.

Furthermore, to avoid an stuck "touch mouse", since not all platforms may report touches raised when the window is unfocused, it checks if touches are still down by the time it's focused again and if so it resets the state of the emulated mouse.

*: In the case of Windows, since it already provides touch-to-mouse translation by itself, "echo" mouse events are filtered out to have it working like the rest.

On X11 a little hack has been needed to avoid a case of a spurious mouse motion event that is generated during touch interaction.

Plus: Improve/fix tracking of current mouse position.

** Summary of changes to settings: **

- `display/window/handheld/emulate_touchscreen` becomes `input/pointing_devices/emulate_touch_from_mouse`
- New setting: `input/pointing_devices/emulate_mouse_from_touch`
2018-04-30 19:03:38 +02:00
..
export Fix getting Android device information 2018-03-20 13:53:33 +09:00
globals Add missing copyright headers and fix formatting 2018-01-05 01:22:23 +01:00
java Remove some debugging prints on Android 2018-02-18 00:09:56 +01:00
android_native_app_glue.c GODOT IS OPEN SOURCE 2014-02-09 22:10:30 -03:00
android_native_app_glue.h Add missing license headers in our source files (#5255) 2016-06-18 14:46:12 +02:00
AndroidManifest.xml.template Prevent android to split-screen 2018-03-21 08:53:51 -04:00
audio_driver_jandroid.cpp Remove some debugging prints on Android 2018-02-18 00:09:56 +01:00
audio_driver_jandroid.h Add missing copyright headers and fix formatting 2018-01-05 01:22:23 +01:00
audio_driver_opensl.cpp Fix intermittent audio driver crash during startup on Android 2018-03-01 17:40:44 +07:00
audio_driver_opensl.h Add missing copyright headers and fix formatting 2018-01-05 01:22:23 +01:00
build.gradle.template Fix Android build error 2018-01-12 04:24:11 +09:00
cpu-features.c ran cppcheck, found unused variables 2015-09-16 15:35:30 -05:00
cpu-features.h 3D Physics Rework, Other Stuff 2014-09-15 11:33:30 -03:00
detect.py Fixed android arm64v8 2017-12-23 16:49:04 +00:00
dir_access_android.cpp Add missing copyright headers and fix formatting 2018-01-05 01:22:23 +01:00
dir_access_android.h Add missing copyright headers and fix formatting 2018-01-05 01:22:23 +01:00
dir_access_jandroid.cpp Remove some debugging prints on Android 2018-02-18 00:09:56 +01:00
dir_access_jandroid.h Add missing copyright headers and fix formatting 2018-01-05 01:22:23 +01:00
file_access_android.cpp Add missing copyright headers and fix formatting 2018-01-05 01:22:23 +01:00
file_access_android.h Add missing copyright headers and fix formatting 2018-01-05 01:22:23 +01:00
file_access_jandroid.cpp Remove some debugging prints on Android 2018-02-18 00:09:56 +01:00
file_access_jandroid.h Add missing copyright headers and fix formatting 2018-01-05 01:22:23 +01:00
godot_android.cpp Remove some debugging prints on Android 2018-02-18 00:09:56 +01:00
ifaddrs_android.cpp Minor code formatting in platform/android 2016-07-21 12:07:01 +02:00
ifaddrs_android.h Making Godot Easier to Use.. 2014-05-24 01:35:47 -03:00
java_class_wrapper.cpp Remove some debugging prints on Android 2018-02-18 00:09:56 +01:00
java_class_wrapper.h Add missing copyright headers and fix formatting 2018-01-05 01:22:23 +01:00
java_glue.cpp Add safety checks when handling Android input 2018-03-27 22:03:44 +07:00
java_glue.h Add missing copyright headers and fix formatting 2018-01-05 01:22:23 +01:00
logo.png Fixed iCCp chunk in pngs 2016-06-22 21:13:29 +02:00
os_android.cpp Implement universal translation of touch to mouse 2018-04-30 19:03:38 +02:00
os_android.h Implement universal translation of touch to mouse 2018-04-30 19:03:38 +02:00
platform_config.h Add missing copyright headers and fix formatting 2018-01-05 01:22:23 +01:00
power_android.cpp Update copyright statements to 2018 2018-01-01 14:40:47 +01:00
power_android.h Update copyright statements to 2018 2018-01-01 14:40:47 +01:00
run_icon.png Use custom native-run icons for Android and HTML5 2017-06-27 21:06:26 +02:00
SCsub Properly closing all files in Python code 2018-03-11 14:55:50 +01:00
sign.sh Making Godot Easier to Use.. 2014-05-24 01:35:47 -03:00
thread_jandroid.cpp Add missing copyright headers and fix formatting 2018-01-05 01:22:23 +01:00
thread_jandroid.h Add missing copyright headers and fix formatting 2018-01-05 01:22:23 +01:00