mirror of
https://github.com/SFML/SFML.git
synced 2024-11-28 22:31:09 +08:00
[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:
parent
5b559f1c08
commit
bc73b12428
@ -368,6 +368,9 @@ void WindowImplAndroid::processMotionEvent(AInputEvent* _event, ActivityStates*
|
||||
}
|
||||
else if (device == AINPUT_SOURCE_TOUCHSCREEN)
|
||||
{
|
||||
if (states->touchEvents[id].x == x && states->touchEvents[id].y == y)
|
||||
continue;
|
||||
|
||||
event.touch.finger = id;
|
||||
event.touch.x = x;
|
||||
event.touch.y = y;
|
||||
|
Loading…
Reference in New Issue
Block a user