-
-
Notifications
You must be signed in to change notification settings - Fork 2.4k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[core] Problem with IsMouseButtonUp
which always returns true
#3606
Comments
I confirm the same behavior with the 5.0 release as well as the current 5.1-dev. Windows 10, VS 2022 17.8.2 Build Tools. Nice workaround though :). |
@Bigfoot71 Isn't that exactly how To get a single event, I assume one would use IMHO, it's working like it's supposed to. |
@ubkp Yes, Try the example I shared, you will see the problem, sorry if I express myself badly |
@Bigfoot71 You're right, very good catch! The problem appears to be that Not sure if diff --git a/rcore_desktopOLD.c b/rcore_desktopNEW.c
index 0aca731..c1d4b5d 100644
--- a/rcore_desktopOLD.c
+++ b/rcore_desktopNEW.c
@@ -1739,6 +1739,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 @Bigfoot71 Please send the PR :) |
As is so happens I was also looking into this, and just caught this as well I sent a PR #3609 |
Issue description
I noticed that the
IsMouseButtonUp
function always returns true withPLATFORM_DESKTOP
on the master branch (984e83c).Environment
Linux Mint 21.2, 64-bit, Cinnamon
Code Example
Edit: Note that doing
if (!IsMouseButtonDown(MOUSE_BUTTON_LEFT))
works for meThe text was updated successfully, but these errors were encountered: