Fix touch count reset (#4488)
This commit is contained in:
parent
8af7985ece
commit
700e2c5e5d
@ -1778,11 +1778,14 @@ static EM_BOOL EmscriptenTouchCallback(int eventType, const EmscriptenTouchEvent
|
|||||||
|
|
||||||
// Gesture data is sent to gestures system for processing
|
// Gesture data is sent to gestures system for processing
|
||||||
ProcessGestureEvent(gestureEvent);
|
ProcessGestureEvent(gestureEvent);
|
||||||
|
|
||||||
// Reset the pointCount for web, if it was the last Touch End event
|
|
||||||
if (eventType == EMSCRIPTEN_EVENT_TOUCHEND && CORE.Input.Touch.pointCount == 1) CORE.Input.Touch.pointCount = 0;
|
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
if (eventType == EMSCRIPTEN_EVENT_TOUCHEND)
|
||||||
|
{
|
||||||
|
CORE.Input.Touch.pointCount--;
|
||||||
|
if (CORE.Input.Touch.pointCount < 0) CORE.Input.Touch.pointCount = 0;
|
||||||
|
}
|
||||||
|
|
||||||
return 1; // The event was consumed by the callback handler
|
return 1; // The event was consumed by the callback handler
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user