mirror of
https://gitlab.freedesktop.org/libinput/libinput.git
synced 2026-01-09 23:50:17 +01:00
filter: Fix get_direction for short vectors
Short vectors alongside the x axis produced inverted directions. Signed-off-by: Jonas Ådahl <jadahl@gmail.com> Reviewed-by: Hans de Goede <hdegoede@redhat.com>
This commit is contained in:
parent
e18e9d56a8
commit
acce2da38c
1 changed files with 2 additions and 2 deletions
|
|
@ -105,9 +105,9 @@ get_direction(int dx, int dy)
|
|||
else if (dx < 0 && dy < 0)
|
||||
dir = N | NW | W;
|
||||
else if (dx > 0)
|
||||
dir = NW | W | SW;
|
||||
else if (dx < 0)
|
||||
dir = NE | E | SE;
|
||||
else if (dx < 0)
|
||||
dir = NW | W | SW;
|
||||
else if (dy > 0)
|
||||
dir = SE | S | SW;
|
||||
else if (dy < 0)
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue