Slab
Slab copied to clipboard
Clicks get dropped at low framerate
Using love.mouse.isDown
is not sufficient for reliable click detection. Clicks may occur between mouse sampling points and go unnoticed by the game/application. The lower the framerate, the higher the probability that this happens.
Solution: use love.mousepressed
and love.mousereleased
instead, and make sure the click event has an effect even when mousereleased
gets called in the same frame as mousepressed
.
I'd probably leave this one for you as I don't have any idea how to solve this as i haven't yet experienced this issue in love 🤔
You can test this by adding love.timer.sleep(.2)
at the bottom of love.draw
in main.lua
. It's gonna be pretty difficult to click anything.
The same problem was apparently occuring in Keyboard.lua
. The same solution would work for the mouse.
This is now fixed for clicks, but still an issue when resizing a window at low framerates. Possibly other places too.