From 5889cc221857f86328e4696c7e900d1fd8c138e8 Mon Sep 17 00:00:00 2001 From: folecr Date: Fri, 26 Jul 2013 18:20:02 -0700 Subject: [PATCH] Shift by correct amount --- cocos2dx/platform/android/nativeactivity.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/cocos2dx/platform/android/nativeactivity.cpp b/cocos2dx/platform/android/nativeactivity.cpp index f94906ba05..02cb7c5364 100644 --- a/cocos2dx/platform/android/nativeactivity.cpp +++ b/cocos2dx/platform/android/nativeactivity.cpp @@ -263,7 +263,7 @@ static int32_t handle_touch_input(AInputEvent *event) { case AMOTION_EVENT_ACTION_POINTER_DOWN: { LOGI("AMOTION_EVENT_ACTION_POINTER_DOWN"); - int pointerIndex = AMotionEvent_getAction(event) >> AMOTION_EVENT_ACTION_POINTER_INDEX_MASK; + int pointerIndex = AMotionEvent_getAction(event) >> AMOTION_EVENT_ACTION_POINTER_INDEX_SHIFT; int pointerId = AMotionEvent_getPointerId(event, pointerIndex); float xP = AMotionEvent_getX(event,pointerIndex); float yP = AMotionEvent_getY(event,pointerIndex); @@ -311,7 +311,7 @@ static int32_t handle_touch_input(AInputEvent *event) { case AMOTION_EVENT_ACTION_POINTER_UP: { LOGI("AMOTION_EVENT_ACTION_POINTER_UP"); - int pointerIndex = AMotionEvent_getAction(event) >> AMOTION_EVENT_ACTION_POINTER_INDEX_MASK; + int pointerIndex = AMotionEvent_getAction(event) >> AMOTION_EVENT_ACTION_POINTER_INDEX_SHIFT; int pointerId = AMotionEvent_getPointerId(event, pointerIndex); float xP = AMotionEvent_getX(event,pointerIndex); float yP = AMotionEvent_getY(event,pointerIndex);