mirror of
https://github.com/raysan5/raylib.git
synced 2025-09-06 03:18:14 +00:00
Fix swipe gestures for web (#3151)
This commit is contained in:
@@ -6131,6 +6131,10 @@ static EM_BOOL EmscriptenTouchCallback(int eventType, const EmscriptenTouchEvent
|
|||||||
{
|
{
|
||||||
gestureEvent.pointId[i] = CORE.Input.Touch.pointId[i];
|
gestureEvent.pointId[i] = CORE.Input.Touch.pointId[i];
|
||||||
gestureEvent.position[i] = CORE.Input.Touch.position[i];
|
gestureEvent.position[i] = CORE.Input.Touch.position[i];
|
||||||
|
|
||||||
|
// Normalize gestureEvent.position[i]
|
||||||
|
gestureEvent.position[i].x /= (float)GetScreenWidth();
|
||||||
|
gestureEvent.position[i].y /= (float)GetScreenHeight();
|
||||||
}
|
}
|
||||||
|
|
||||||
// Gesture data is sent to gestures system for processing
|
// Gesture data is sent to gestures system for processing
|
||||||
|
Reference in New Issue
Block a user