mirror of
https://gitlab.freedesktop.org/libinput/libinput.git
synced 2025-12-31 12:20:09 +01:00
touchpad: simplify resolution check
The struct evdev_device's absinfo_x/y point to the right axis Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net> Reviewed-by: Hans de Goede <hdegoede@redhat.com>
This commit is contained in:
parent
a3a81d1dee
commit
1884ee186e
1 changed files with 2 additions and 11 deletions
|
|
@ -961,17 +961,8 @@ tp_init_accel(struct tp_dispatch *tp, double diagonal)
|
|||
{
|
||||
int res_x, res_y;
|
||||
|
||||
if (tp->has_mt) {
|
||||
res_x = libevdev_get_abs_resolution(tp->device->evdev,
|
||||
ABS_MT_POSITION_X);
|
||||
res_y = libevdev_get_abs_resolution(tp->device->evdev,
|
||||
ABS_MT_POSITION_Y);
|
||||
} else {
|
||||
res_x = libevdev_get_abs_resolution(tp->device->evdev,
|
||||
ABS_X);
|
||||
res_y = libevdev_get_abs_resolution(tp->device->evdev,
|
||||
ABS_Y);
|
||||
}
|
||||
res_x = tp->device->abs.absinfo_x->resolution;
|
||||
res_y = tp->device->abs.absinfo_y->resolution;
|
||||
|
||||
/*
|
||||
* Not all touchpads report the same amount of units/mm (resolution).
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue