Shift by correct amount

This commit is contained in:
folecr 2013-07-26 18:20:02 -07:00
parent fa940ec292
commit 5889cc2218
1 changed files with 2 additions and 2 deletions

View File

@ -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);