From 22f5f67522c5128b893a2e26b03e4f0430102c53 Mon Sep 17 00:00:00 2001 From: twinaphex Date: Sun, 16 Dec 2012 16:35:49 +0100 Subject: [PATCH] (Android) Use AMotionEvent_getPointerCount() > 0 --- android/native/jni/input_android.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/android/native/jni/input_android.c b/android/native/jni/input_android.c index edb73349ec..bb91143538 100644 --- a/android/native/jni/input_android.c +++ b/android/native/jni/input_android.c @@ -292,8 +292,10 @@ static void android_input_poll(void *data) i = state_device_ids[id] = pads_connected++; int motion_action = AMotionEvent_getAction(event); + int pointer_count = AMotionEvent_getPointerCount(event); bool motion_do = ((motion_action == AMOTION_EVENT_ACTION_DOWN) || (motion_action == - AMOTION_EVENT_ACTION_POINTER_DOWN) || (motion_action == AMOTION_EVENT_ACTION_MOVE)); + AMOTION_EVENT_ACTION_POINTER_DOWN) || (motion_action == AMOTION_EVENT_ACTION_MOVE) + && pointer_count); if(type == AINPUT_EVENT_TYPE_MOTION && motion_do) {