Skip to content

Commit

Permalink
Fix Touch pointCount for web (#3163)
Browse files Browse the repository at this point in the history
  • Loading branch information
ubkp authored Jul 10, 2023
1 parent 91e4eea commit 4b6cbd2
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions src/rcore.c
Original file line number Diff line number Diff line change
Expand Up @@ -6139,6 +6139,9 @@ static EM_BOOL EmscriptenTouchCallback(int eventType, const EmscriptenTouchEvent

// Gesture data is sent to gestures system for processing
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

return 1; // The event was consumed by the callback handler
Expand Down

0 comments on commit 4b6cbd2

Please sign in to comment.