[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:
parent
22895ba14f
commit
b980268ba7
6 changed files with 360 additions and 19 deletions
|
@ -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
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue