diff options
| author | ubkp <[email protected]> | 2023-07-10 13:58:56 -0300 |
|---|---|---|
| committer | GitHub <[email protected]> | 2023-07-10 18:58:56 +0200 |
| commit | 4b6cbd234040312091e24085ee929a7cec60faac (patch) | |
| tree | 71ab38cb12980eaf263221ae754810e64ddd4c45 | |
| parent | 91e4eea52d1b92e1408fd129ca7b638f9cd4531d (diff) | |
| download | raylib-4b6cbd234040312091e24085ee929a7cec60faac.tar.gz raylib-4b6cbd234040312091e24085ee929a7cec60faac.zip | |
Fix Touch pointCount for web (#3163)
| -rw-r--r-- | src/rcore.c | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/src/rcore.c b/src/rcore.c index 6ef25c0b..833400fc 100644 --- a/src/rcore.c +++ b/src/rcore.c @@ -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 |
