mirror of
https://github.com/raysan5/raylib.git
synced 2025-09-06 03:18:14 +00:00
[rcore] Fix IsMouseButtonUp()
for PLATFORM_WEB
and PLATFORM_DRM
(#3611)
* Fix IsMouseButtonUp() for PLATFORM_WEB * Fix IsMouseButtonUp() for PLATFORM_DRM
This commit is contained in:
@@ -571,6 +571,7 @@ void PollInputEvents(void)
|
|||||||
{
|
{
|
||||||
CORE.Input.Mouse.previousButtonState[i] = CORE.Input.Mouse.currentButtonState[i];
|
CORE.Input.Mouse.previousButtonState[i] = CORE.Input.Mouse.currentButtonState[i];
|
||||||
CORE.Input.Mouse.currentButtonState[i] = platform.currentButtonStateEvdev[i];
|
CORE.Input.Mouse.currentButtonState[i] = platform.currentButtonStateEvdev[i];
|
||||||
|
CORE.Input.Touch.currentTouchState[i] = platform.currentButtonStateEvdev[i];
|
||||||
}
|
}
|
||||||
|
|
||||||
// Register gamepads buttons events
|
// Register gamepads buttons events
|
||||||
|
@@ -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,
|
// 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)
|
// but future releases may add more actions (i.e. GLFW_REPEAT)
|
||||||
CORE.Input.Mouse.currentButtonState[button] = action;
|
CORE.Input.Mouse.currentButtonState[button] = action;
|
||||||
|
CORE.Input.Touch.currentTouchState[button] = action;
|
||||||
|
|
||||||
#if defined(SUPPORT_GESTURES_SYSTEM) && defined(SUPPORT_MOUSE_GESTURES)
|
#if defined(SUPPORT_GESTURES_SYSTEM) && defined(SUPPORT_MOUSE_GESTURES)
|
||||||
// Process mouse events as touches to be able to use mouse-gestures
|
// Process mouse events as touches to be able to use mouse-gestures
|
||||||
|
Reference in New Issue
Block a user