diff --git a/src/SFML/Window/Android/WindowImplAndroid.cpp b/src/SFML/Window/Android/WindowImplAndroid.cpp index fb1906bbb..78e20093b 100644 --- a/src/SFML/Window/Android/WindowImplAndroid.cpp +++ b/src/SFML/Window/Android/WindowImplAndroid.cpp @@ -433,7 +433,7 @@ int WindowImplAndroid::processMotionEvent(AInputEvent* _event, ActivityStates* s if (device == AINPUT_SOURCE_MOUSE) event.type = Event::MouseMoved; - else if (device == AINPUT_SOURCE_TOUCHSCREEN) + else if (device & AINPUT_SOURCE_TOUCHSCREEN) event.type = Event::TouchMoved; int pointerCount = AMotionEvent_getPointerCount(_event); @@ -452,7 +452,7 @@ int WindowImplAndroid::processMotionEvent(AInputEvent* _event, ActivityStates* s states->mousePosition = Vector2i(event.mouseMove.x, event.mouseMove.y); } - else if (device == AINPUT_SOURCE_TOUCHSCREEN) + else if (device & AINPUT_SOURCE_TOUCHSCREEN) { if (states->touchEvents[id].x == x && states->touchEvents[id].y == y) continue; @@ -496,7 +496,7 @@ int WindowImplAndroid::processPointerEvent(bool isDown, AInputEvent* _event, Act if (id >= 0 && id < Mouse::ButtonCount) states->isButtonPressed[id] = true; } - else if (device == AINPUT_SOURCE_TOUCHSCREEN) + else if (device & AINPUT_SOURCE_TOUCHSCREEN) { event.type = Event::TouchBegan; event.touch.finger = id; @@ -518,7 +518,7 @@ int WindowImplAndroid::processPointerEvent(bool isDown, AInputEvent* _event, Act if (id >= 0 && id < Mouse::ButtonCount) states->isButtonPressed[id] = false; } - else if (device == AINPUT_SOURCE_TOUCHSCREEN) + else if (device & AINPUT_SOURCE_TOUCHSCREEN) { event.type = Event::TouchEnded; event.touch.finger = id;