summaryrefslogtreecommitdiffhomepage
path: root/cmake/raylib-config-version.cmake
diff options
context:
space:
mode:
authorOskari Timperi <[email protected]>2019-12-04 19:29:11 +0200
committerRay <[email protected]>2019-12-04 18:29:11 +0100
commit8a08a9b2251d7717a1277c2343fb92b36e129644 (patch)
tree9f85eb09c46403693af813374dc010b4611cc75f /cmake/raylib-config-version.cmake
parent1b7d136daaa1e82f2d5c9dbf84bd0f1bd4d043a6 (diff)
downloadraylib-8a08a9b2251d7717a1277c2343fb92b36e129644.tar.gz
raylib-8a08a9b2251d7717a1277c2343fb92b36e129644.zip
Fix `IsMouseButtonReleased()` when press/release events come too fast (#1032)
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 'cmake/raylib-config-version.cmake')
0 files changed, 0 insertions, 0 deletions