mirror of
https://gitlab.freedesktop.org/libinput/libinput.git
synced 2026-02-04 04:40:25 +01:00
tools: libinput-record: add separate variable for the first device
Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
This commit is contained in:
parent
7dc52459b3
commit
3b20f3d02b
1 changed files with 5 additions and 2 deletions
|
|
@ -764,6 +764,7 @@ mainloop(struct record_context *ctx)
|
|||
bool autorestart = (ctx->timeout > 0);
|
||||
struct pollfd fds[ctx->ndevices + 1];
|
||||
struct record_device *d = NULL;
|
||||
struct record_device *first_device = NULL;
|
||||
struct timespec ts;
|
||||
sigset_t mask;
|
||||
int idx;
|
||||
|
|
@ -821,8 +822,10 @@ mainloop(struct record_context *ctx)
|
|||
|
||||
/* we only print the first device's description, the
|
||||
* rest is assembled after CTRL+C */
|
||||
d = list_first_entry(&ctx->devices, d, link);
|
||||
print_device_description(ctx, d);
|
||||
first_device = list_first_entry(&ctx->devices,
|
||||
first_device,
|
||||
link);
|
||||
print_device_description(ctx, first_device);
|
||||
|
||||
iprintf(ctx, "events:\n");
|
||||
indent_push(ctx);
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue