SDL-mirror/android-project
Sam Lantinga 2067ef5659 Fixed bug 3464 - Fix for Android hint SDL_HINT_ANDROID_SEPARATE_MOUSE_AND_TOUCH
ny00

According to the current documentation in SDL_hints.h, if SDL_HINT_ANDROID_SEPARATE_MOUSE_AND_TOUCH is set to "0" (or not set at all) then mouse input should lead to touch events, along with corresponding *fake* mouse events with mouse id SDL_TOUCH_MOUSEID.

However, while moving a mouse around (actually using a trackpad identified as a mouse), I get SDL mouse motion events with differing mouse ids, as follows:
- If the mouse is moved while a mouse button is pressed, the mouse id is SDL_TOUCH_MOUSEID.
- Otherwise, the mouse id for mouse motion events is 0.

I've attached sample code for reference, which includes logs of the various mouse events (the "which" field is covered).

I believe that no actual mouse event should arrive, if the hint is unset. In particular, no mouse motion event should arrive while no mouse button is pressed.

I'm going to attach a patch which resolves this, while also disabling mouse wheel motion events.
2017-08-11 13:37:40 -07:00
..
jni Fixed bug 2758 - Android issues with NDK r10c and API-21 2016-10-14 06:57:55 -07:00
res Fixed bug 1779 - SDL's Android project template has old default icons from Android. 2013-04-02 07:55:25 -07:00
src/org/libsdl/app Fixed bug 3464 - Fix for Android hint SDL_HINT_ANDROID_SEPARATE_MOUSE_AND_TOUCH 2017-08-11 13:37:40 -07:00
AndroidManifest.xml android: add screenSize to AndroidManifest's configChanges (thanks, Daniel!). 2017-05-19 15:06:05 -04:00
ant.properties Updated the Android project template and README.android 2012-11-02 02:37:49 -07:00
build.properties Added the Android project and lots of info to README.android 2011-01-06 17:12:31 -08:00
build.xml Updated the Android project template and README.android 2012-11-02 02:37:49 -07:00
default.properties Adds Joystick support for Android 2013-11-05 20:07:39 -03:00
proguard-project.txt Updated the Android project template and README.android 2012-11-02 02:37:49 -07:00
project.properties Adds Joystick support for Android 2013-11-05 20:07:39 -03:00