diff options
author | Peter Hutterer <peter.hutterer@who-t.net> | 2020-01-30 09:47:51 +1000 |
---|---|---|
committer | Peter Hutterer <peter.hutterer@who-t.net> | 2020-01-30 02:10:33 +0000 |
commit | 8e35a2f949f1fa41bce68ca7e9386c5413e0a4c9 (patch) | |
tree | 1c5a8792939fdec58ee7a4659abcb509534d4cc1 | |
parent | acfec311037d5fa3a663541a47b63da67d0f6f42 (diff) | |
download | libinput-8e35a2f949f1fa41bce68ca7e9386c5413e0a4c9.tar.gz |
tools: refuse to replay recordings with timestamps from the future
This indicates a bug in libinput record, might as well complain about it.
Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
-rwxr-xr-x | tools/libinput-replay | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/tools/libinput-replay b/tools/libinput-replay index ead331ea..0f385205 100755 --- a/tools/libinput-replay +++ b/tools/libinput-replay @@ -116,6 +116,10 @@ def replay(device, verbose): # offset is the offset from the first event on any device. offset = time.time() - device['__first_event_offset'] + if offset < 0: + error('WARNING: event time offset is in the future, refusing to replay') + return + # each 'evdev' set contains one SYN_REPORT so we only need to check for # the time offset once per event for event in events: |