Skip to content

Commit

Permalink
[rcore] Fix IsMouseButtonUp() for PLATFORM_WEB and PLATFORM_DRM (
Browse files Browse the repository at this point in the history
…#3611)

* Fix IsMouseButtonUp() for PLATFORM_WEB

* Fix IsMouseButtonUp() for PLATFORM_DRM
  • Loading branch information
ubkp authored Dec 7, 2023
1 parent ab9bddb commit a9ba51a
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 0 deletions.
1 change: 1 addition & 0 deletions src/platforms/rcore_drm.c
Original file line number Diff line number Diff line change
Expand Up @@ -571,6 +571,7 @@ void PollInputEvents(void)
{
CORE.Input.Mouse.previousButtonState[i] = CORE.Input.Mouse.currentButtonState[i];
CORE.Input.Mouse.currentButtonState[i] = platform.currentButtonStateEvdev[i];
CORE.Input.Touch.currentTouchState[i] = platform.currentButtonStateEvdev[i];
}

// Register gamepads buttons events
Expand Down
1 change: 1 addition & 0 deletions src/platforms/rcore_web.c
Original file line number Diff line number Diff line change
Expand Up @@ -1093,6 +1093,7 @@ static void MouseButtonCallback(GLFWwindow *window, int button, int action, int
// WARNING: GLFW could only return GLFW_PRESS (1) or GLFW_RELEASE (0) for now,
// but future releases may add more actions (i.e. GLFW_REPEAT)
CORE.Input.Mouse.currentButtonState[button] = action;
CORE.Input.Touch.currentTouchState[button] = action;

#if defined(SUPPORT_GESTURES_SYSTEM) && defined(SUPPORT_MOUSE_GESTURES)
// Process mouse events as touches to be able to use mouse-gestures
Expand Down

0 comments on commit a9ba51a

Please sign in to comment.