diff --git a/wlauto/common/bin/arm64/revent b/wlauto/common/bin/arm64/revent index 5dd2a2fd..c4a693c0 100755 Binary files a/wlauto/common/bin/arm64/revent and b/wlauto/common/bin/arm64/revent differ diff --git a/wlauto/common/bin/armeabi/revent b/wlauto/common/bin/armeabi/revent index 96636b5b..97430f10 100755 Binary files a/wlauto/common/bin/armeabi/revent and b/wlauto/common/bin/armeabi/revent differ diff --git a/wlauto/external/revent/revent.c b/wlauto/external/revent/revent.c index 9c90585b..b6dbb71a 100644 --- a/wlauto/external/revent/revent.c +++ b/wlauto/external/revent/revent.c @@ -1264,15 +1264,18 @@ void replay(const char *filepath) int32_t idx = (recording.events[i]).dev_idx; struct input_event ev = (recording.events[i]).event; - while((i < recording.num_events) && !timercmp(&ev.time, &last_event_delta, !=)) { - idx = recording.events[i].dev_idx; - ev = recording.events[i].event; + while(!timercmp(&ev.time, &last_event_delta, !=)) { ret = write(recording.devices.fds[idx], &ev, sizeof(ev)); if (ret != sizeof(ev)) die("Could not replay event"); dprintf("replayed event: type %d code %d value %d\n", ev.type, ev.code, ev.value); i++; + if (i >= recording.num_events) { + break; + } + idx = recording.events[i].dev_idx; + ev = recording.events[i].event; } last_event_delta = ev.time; }