mirror of
https://gitlab.freedesktop.org/libinput/libinput.git
synced 2026-02-03 18:10:28 +01:00
test: skip manually setting uinput resolution if it's already set
If we have libevdev 1.5 or later, the resolution is already set, no need to change it again. Let's rely on libevdev to do the right thing and simply skip the rest if we have one correct nonzero resolution already set on the device. Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net> Reviewed-by: Hans de Goede <hdegoede@redhat.com>
This commit is contained in:
parent
5f4f211d6d
commit
41b9078eec
1 changed files with 4 additions and 0 deletions
|
|
@ -2293,6 +2293,10 @@ litest_create_uinput(const char *name,
|
|||
abs = abs_info;
|
||||
while (abs && abs->value != -1) {
|
||||
if (abs->resolution != 0) {
|
||||
if (libevdev_get_abs_resolution(dev, abs->value) ==
|
||||
abs->resolution)
|
||||
break;
|
||||
|
||||
rc = libevdev_kernel_set_abs_info(dev,
|
||||
abs->value,
|
||||
abs);
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue