diff options
author | Peter Hutterer <peter.hutterer@who-t.net> | 2016-05-18 11:52:12 +1000 |
---|---|---|
committer | Peter Hutterer <peter.hutterer@who-t.net> | 2016-05-20 09:58:19 +1000 |
commit | 41b9078eecb668f136aa8453f78f4297d01206a7 (patch) | |
tree | b65e00a0e170046d6c090eeac7abcf3e7a3c9f54 /test | |
parent | 5f4f211d6dac3bbbf0645c41ee93f9e4297c8fbb (diff) |
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>
Diffstat (limited to 'test')
-rw-r--r-- | test/litest.c | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/test/litest.c b/test/litest.c index 7f5a4d7..66f08f2 100644 --- a/test/litest.c +++ b/test/litest.c @@ -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); |