diff options
Diffstat (limited to 'src')
| -rw-r--r-- | src/rcore.c | 7 |
1 files changed, 6 insertions, 1 deletions
diff --git a/src/rcore.c b/src/rcore.c index 9ab34e15..3e357118 100644 --- a/src/rcore.c +++ b/src/rcore.c @@ -3876,7 +3876,7 @@ static bool InitGraphicsDevice(int width, int height) #if defined(PLATFORM_DESKTOP) // NOTE: GLFW 3.4+ defers initialization of the Joystick subsystem on the first call to any Joystick related functions. - // Forcing this initialization here avoids doing it on `PollInputEvents` called by `EndDrawing` after first frame has been just drawn. + // Forcing this initialization here avoids doing it on PollInputEvents() called by EndDrawing() after first frame has been just drawn. // The initialization will still happen and possible delays still occur, but before the window is shown, which is a nicer experience. // REF: https://github.com/raysan5/raylib/issues/1554 if (MAX_GAMEPADS > 0) glfwSetJoystickCallback(NULL); @@ -4765,6 +4765,11 @@ void PollInputEvents(void) // Register previous touch states for (int i = 0; i < MAX_TOUCH_POINTS; i++) CORE.Input.Touch.previousTouchState[i] = CORE.Input.Touch.currentTouchState[i]; + + // Reset touch positions + // TODO: It resets on PLATFORM_WEB the mouse position and not filled again until a move-event, + // so, if mouse is not moved it returns a (0, 0) position... this behaviour should be reviewed! + //for (int i = 0; i < MAX_TOUCH_POINTS; i++) CORE.Input.Touch.position[i] = (Vector2){ 0, 0 }; #if defined(PLATFORM_DESKTOP) // Check if gamepads are ready |
