mirror of
https://gitlab.freedesktop.org/libevdev/libevdev.git
synced 2025-12-20 06:50:06 +01:00
test: don't set the abs value when initializing an uinput device
The helper function uses abs.value for the axis code (to save a parameter). Reset that to 0 before we write to the device Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
This commit is contained in:
parent
7645b083f4
commit
53abcb64d5
1 changed files with 8 additions and 1 deletions
|
|
@ -75,7 +75,14 @@ int test_create_abs_device(struct uinput_device **uidev_return,
|
|||
va_end(args);
|
||||
|
||||
while (--nabs >= 0) {
|
||||
rc = uinput_device_set_abs_bit(uidev, abs[nabs].value, &abs[nabs]);
|
||||
int code;
|
||||
struct input_absinfo a;
|
||||
|
||||
code = abs[nabs].value;
|
||||
a = abs[nabs];
|
||||
a.value = 0;
|
||||
|
||||
rc = uinput_device_set_abs_bit(uidev, code, &a);
|
||||
ck_assert_msg(rc == 0, "for abs field %d\n", nabs);
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue