Fix that touch doesn't work for click/drag/raygui

This commit is contained in:
casavaca 2024-01-13 00:01:19 -08:00
parent 9d628d1d49
commit e23ad1c8f8
No known key found for this signature in database
GPG Key ID: 916401545D431B19

View File

@ -1635,6 +1635,11 @@ static EM_BOOL EmscriptenTouchCallback(int eventType, const EmscriptenTouchEvent
else if (eventType == EMSCRIPTEN_EVENT_TOUCHEND) CORE.Input.Touch.currentTouchState[i] = 0; else if (eventType == EMSCRIPTEN_EVENT_TOUCHEND) CORE.Input.Touch.currentTouchState[i] = 0;
} }
if (CORE.Input.Touch.pointCount == 1) {
CORE.Input.Mouse.currentPosition.x = CORE.Input.Touch.position[0].x;
CORE.Input.Mouse.currentPosition.y = CORE.Input.Touch.position[0].y;
}
#if defined(SUPPORT_GESTURES_SYSTEM) #if defined(SUPPORT_GESTURES_SYSTEM)
GestureEvent gestureEvent = {0}; GestureEvent gestureEvent = {0};