From fc92bb86d141848bd93bac0f16529130fdf64b31 Mon Sep 17 00:00:00 2001 From: Sergii Pylypenko Date: Fri, 10 Oct 2014 22:24:50 +0300 Subject: [PATCH] Do not fire right mouse button when lifting fingers, if middle button was pressed --- project/jni/sdl-1.2/src/video/android/SDL_androidinput.c | 3 +++ 1 file changed, 3 insertions(+) diff --git a/project/jni/sdl-1.2/src/video/android/SDL_androidinput.c b/project/jni/sdl-1.2/src/video/android/SDL_androidinput.c index db45612a6..5de71dda2 100644 --- a/project/jni/sdl-1.2/src/video/android/SDL_androidinput.c +++ b/project/jni/sdl-1.2/src/video/android/SDL_androidinput.c @@ -709,7 +709,10 @@ static void ProcessMouseMultitouch( int action, int pointerId ) } } if( pointerId != firstMousePointerId && pointerId != secondMousePointerId && (action == MOUSE_DOWN || action == MOUSE_UP) ) + { SDL_ANDROID_MainThreadPushMouseButton( (action == MOUSE_DOWN) ? SDL_PRESSED : SDL_RELEASED, SDL_BUTTON_MIDDLE ); + multitouchGestureHappened = 1; // Prevent firing left mouse button when lifting two fingers + } } static void ProcessMouseHover( jint *xx, jint *yy, int action, int distance )