Commit 303565c3 authored by Peter Hutterer's avatar Peter Hutterer

test: fix default axis value assignment

Was assigned to -1 if no custom axes were provided.
Signed-off-by: Peter Hutterer's avatarPeter Hutterer <peter.hutterer@who-t.net>
Reviewed-by: default avatarHans de Goede <hdegoede@redhat.com>
parent 8ba5b9cb
......@@ -1223,6 +1223,9 @@ axis_replacement_value(struct axis_replacement *axes,
{
struct axis_replacement *axis = axes;
if (!axes)
return false;
while (axis->evcode != -1) {
if (axis->evcode == evcode) {
*value = axis->value;
......@@ -1267,9 +1270,6 @@ litest_auto_assign_value(struct litest_device *d,
break;
default:
value = -1;
if (!axes)
break;
if (!axis_replacement_value(axes, ev->code, &value) &&
d->interface->get_axis_default)
d->interface->get_axis_default(d, ev->code, &value);
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment