[Android] Fixed redundant touch moved events

Previously moving any finger would create `sf::Event::TouchMoved` events
for all fingers, even if their position didn't change at all.
This commit is contained in:
Mario Liebisch 2014-06-20 23:38:28 +02:00
parent 5b559f1c08
commit bc73b12428

View File

@ -368,6 +368,9 @@ void WindowImplAndroid::processMotionEvent(AInputEvent* _event, ActivityStates*
} }
else if (device == AINPUT_SOURCE_TOUCHSCREEN) else if (device == AINPUT_SOURCE_TOUCHSCREEN)
{ {
if (states->touchEvents[id].x == x && states->touchEvents[id].y == y)
continue;
event.touch.finger = id; event.touch.finger = id;
event.touch.x = x; event.touch.x = x;
event.touch.y = y; event.touch.y = y;