mirror of
https://gitlab.freedesktop.org/libinput/libinput.git
synced 2025-12-27 12:40:12 +01:00
tools: libinput-record: fix frame printing for multiple devices
The evdev events were just dumped into one big list instead of being split up by frame. Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
This commit is contained in:
parent
a6d03c9c8f
commit
12410dfba4
1 changed files with 14 additions and 4 deletions
|
|
@ -218,13 +218,23 @@ print_evdev_event(struct record_context *ctx, struct input_event *ev)
|
|||
static inline void
|
||||
print_evdev_events(struct record_context *ctx, struct input_event *e, size_t nevents)
|
||||
{
|
||||
iprintf(ctx, "- evdev:\n");
|
||||
indent_push(ctx);
|
||||
bool have_ev_syn = true;
|
||||
|
||||
for (size_t i = 0; i < nevents; i++)
|
||||
|
||||
for (size_t i = 0; i < nevents; i++) {
|
||||
if (have_ev_syn) {
|
||||
iprintf(ctx, "- evdev:\n");
|
||||
indent_push(ctx);
|
||||
have_ev_syn = false;
|
||||
}
|
||||
print_evdev_event(ctx, &e[i]);
|
||||
|
||||
indent_pop(ctx);
|
||||
if (e[i].type == EV_SYN && e[i].code == SYN_REPORT) {
|
||||
have_ev_syn = true;
|
||||
indent_pop(ctx);
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
static inline size_t
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue