mirror of
https://github.com/mpv-player/mpv
synced 2025-01-27 18:13:15 +00:00
wayland: avoid handling a 0-value axis event
This shouldn't be possible, but an extra check never hurts.
This commit is contained in:
parent
6111f57ef9
commit
685e927fbe
@ -189,6 +189,8 @@ static void pointer_handle_axis(void *data, struct wl_pointer *wl_pointer,
|
|||||||
uint32_t time, uint32_t axis, wl_fixed_t value)
|
uint32_t time, uint32_t axis, wl_fixed_t value)
|
||||||
{
|
{
|
||||||
struct vo_wayland_state *wl = data;
|
struct vo_wayland_state *wl = data;
|
||||||
|
if (wl_fixed_to_double(value) == 0)
|
||||||
|
return;
|
||||||
double val = wl_fixed_to_double(value)/abs(wl_fixed_to_double(value));
|
double val = wl_fixed_to_double(value)/abs(wl_fixed_to_double(value));
|
||||||
switch (axis) {
|
switch (axis) {
|
||||||
case WL_POINTER_AXIS_VERTICAL_SCROLL:
|
case WL_POINTER_AXIS_VERTICAL_SCROLL:
|
||||||
|
Loading…
Reference in New Issue
Block a user