diff options
| author | ubkp <[email protected]> | 2023-07-03 04:29:26 -0300 |
|---|---|---|
| committer | GitHub <[email protected]> | 2023-07-03 09:29:26 +0200 |
| commit | ffe4d36e0af86ee2d72abe7607b0525e1ffcf61f (patch) | |
| tree | 2effab6e7115fd177a16f1457767b21dd4d2d1c4 /src | |
| parent | fdc28fce80d6e9ae04e900079beba7d79673b25d (diff) | |
| download | raylib-ffe4d36e0af86ee2d72abe7607b0525e1ffcf61f.tar.gz raylib-ffe4d36e0af86ee2d72abe7607b0525e1ffcf61f.zip | |
Fix swipe gestures for web (#3151)
Diffstat (limited to 'src')
| -rw-r--r-- | src/rcore.c | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/src/rcore.c b/src/rcore.c index 135ccb6c..6ef25c0b 100644 --- a/src/rcore.c +++ b/src/rcore.c @@ -6131,6 +6131,10 @@ static EM_BOOL EmscriptenTouchCallback(int eventType, const EmscriptenTouchEvent { gestureEvent.pointId[i] = CORE.Input.Touch.pointId[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 |
