aboutsummaryrefslogtreecommitdiff
path: root/projects/VSCode/main.code-workspace
diff options
context:
space:
mode:
authorOskari Timperi <oskari.timperi@iki.fi>2019-12-04 19:13:43 +0200
committerOskari Timperi <oskari.timperi@iki.fi>2019-12-04 19:13:43 +0200
commit8470767bc9a51ae73b2b70b4a5ed57f666fdc024 (patch)
tree5e5eb9f169bdb5a6103ec77918422459de56c73c /projects/VSCode/main.code-workspace
parent3d936061c8a39e4918399a805aac6b33ed97310a (diff)
downloadraylib-fix-mouse-released.tar.gz
raylib-fix-mouse-released.zip
Fix `IsMouseButtonReleased()` when press/release events come too fastfix-mouse-released
If press/release events for a mouse button come too fast, then using `IsMouseButtonReleased()` does not work. This has been noticed when using a touchpad on Linux when tapping with two fingers two emulate right mouse button click. The situation looks like this: ``` BeginDrawing <-- current==released, previous==released Pressed <-- current=pressed Released <-- current=released IsMouseButtonReleased <-- returns false because current==previous EndDrawing <-- previous=released ``` The fix is to update the previous mouse button state in addition to current mouse button state when `MouseButtonCallback()` is called by glfw. Now the situation is as follows: ``` BeginDrawing <-- current==released, previous==released Pressed <-- current=pressed, previous=released Released <-- current=released, previous=pressed IsMouseButtonReleased <-- returns true because current!=previous EndDrawing <-- previous=released ```
Diffstat (limited to 'projects/VSCode/main.code-workspace')
0 files changed, 0 insertions, 0 deletions