mirror of
https://github.com/raysan5/raylib.git
synced 2025-09-15 07:48:15 +00:00
[example] Core Input Gestures for Web (#3172)
* [example] Core Input Gestures for Web * Fix Doubletap for web * Changes TAP_TIMEOUT and rgGetCurrentTime to seconds
This commit is contained in:
@@ -5593,8 +5593,14 @@ static void MouseButtonCallback(GLFWwindow *window, int button, int action, int
|
||||
gestureEvent.position[0].y /= (float)GetScreenHeight();
|
||||
|
||||
// Gesture data is sent to gestures-system for processing
|
||||
#if defined(PLATFORM_WEB)
|
||||
// Prevent calling ProcessGestureEvent() when Emscripten is present and there's a touch gesture, so EmscriptenTouchCallback() can handle it itself
|
||||
if (GetMouseX() != 0 || GetMouseY() != 0) ProcessGestureEvent(gestureEvent);
|
||||
#else
|
||||
ProcessGestureEvent(gestureEvent);
|
||||
#endif
|
||||
|
||||
#endif
|
||||
}
|
||||
|
||||
// GLFW3 Cursor Position Callback, runs on mouse move
|
||||
|
Reference in New Issue
Block a user