Quellcode durchsuchen

Fix touch count reset (#4488)

pull/4489/head
Asdqwe vor 3 Tagen
committed von GitHub
Ursprung
Commit
700e2c5e5d
Es konnte kein GPG-Schlüssel zu dieser Signatur gefunden werden GPG-Schlüssel-ID: B5690EEEBB952194
1 geänderte Dateien mit 6 neuen und 3 gelöschten Zeilen
  1. +6
    -3
      src/platforms/rcore_web.c

+ 6
- 3
src/platforms/rcore_web.c Datei anzeigen

@ -1778,11 +1778,14 @@ 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
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
}

Laden…
Abbrechen
Speichern