tools/record: append the devices in-order

Using list_insert() here means the last device specified on the commandline is
the one that ends up in the file first - not very obvious...

Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
This commit is contained in:
Peter Hutterer 2021-03-26 12:56:43 +10:00
parent 0cdf459643
commit 0b23cb1ba2

View file

@ -2466,7 +2466,7 @@ init_device(struct record_context *ctx, const char *path, bool grab)
if (libevdev_get_num_slots(d->evdev) > 0)
d->touch.is_touch_device = true;
list_insert(&ctx->devices, &d->link);
list_append(&ctx->devices, &d->link);
ctx->ndevices++;
return true;