1
0
mirror of https://github.com/mpv-player/mpv synced 2024-12-23 15:22:09 +00:00

input: discard precise scrolling commands with no value

Apparently Cocoa precise scrolling generates a lot of spurious events with
a delta that is equal to 0.0. Make sure that they are discarded and not added
to the input queue.

Even though this only known to happen with Cocoa, I implemented this at core
level since it makes sense in general.

Fixes: #310
This commit is contained in:
Stefano Pigozzi 2013-11-25 19:31:13 +01:00
parent 98fca35318
commit 2aeeb28dd1

View File

@ -1646,6 +1646,8 @@ void mp_input_put_key_utf8(struct input_ctx *ictx, int mods, struct bstr t)
void mp_input_put_axis(struct input_ctx *ictx, int direction, double value)
{
if (value == 0.0)
return;
input_lock(ictx);
mp_input_feed_key(ictx, direction, value);
input_unlock(ictx);