Commit cf28727f891cf81f7fa3dedd533cea9abca53dba

Philipp Wiesemann 2016-08-30T21:14:52

Android: Fixed missing mouse motion events while button down (thanks, Sylvain!). Happened for real mouse if SDL_HINT_ANDROID_SEPARATE_MOUSE_AND_TOUCH was active. Fixes Bugzilla #3313.

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
diff --git a/src/video/android/SDL_androidmouse.c b/src/video/android/SDL_androidmouse.c
index bfbb843..883fa8d 100644
--- a/src/video/android/SDL_androidmouse.c
+++ b/src/video/android/SDL_androidmouse.c
@@ -32,6 +32,7 @@
 
 #define ACTION_DOWN 0
 #define ACTION_UP 1
+#define ACTION_MOVE 2
 #define ACTION_HOVER_MOVE 7
 #define ACTION_SCROLL 8
 #define BUTTON_PRIMARY 1
@@ -77,6 +78,7 @@ void Android_OnMouse( int androidButton, int action, float x, float y) {
             SDL_SendMouseButton(Android_Window, 0, SDL_RELEASED, SDLButton);
             break;
 
+        case ACTION_MOVE:
         case ACTION_HOVER_MOVE:
             SDL_SendMouseMotion(Android_Window, 0, 0, x, y);
             break;