mirror of
https://gitlab.freedesktop.org/libinput/libinput.git
synced 2026-03-25 11:50:41 +01:00
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>
This commit is contained in:
parent
acfec31103
commit
8e35a2f949
1 changed files with 4 additions and 0 deletions
|
|
@ -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:
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue