Fix reMarkable crash bug v2022.05: event overwrite with new time module (#9121)

The change from timeval to time completely broke reMarkable.
frontend/device/remarkable/device.lua was using TimeVal:now() to manually overwrite event time values, as noted in the code comments.
Input:handleTouchEv is expecting those event time values to be timevals, not integer times.
So as soon as the user touches the screen, crash.
pull/9123/head v2022.05.1
Glen Sawyer 2 years ago committed by GitHub
parent 2b3043796c
commit cb95dcd4c9
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

@ -95,7 +95,11 @@ function Remarkable2:adjustTouchEvent(ev, by)
-- Inject CLOCK_MONOTONIC timestamps at the end of every input frame in order to have consistent gesture detection across input devices.
-- c.f., #7536
if ev.type == C.EV_SYN and ev.code == C.SYN_REPORT then
ev.time = time.now()
local sec, usec = time.split_s_us(time.now())
ev.time = {
sec = sec,
usec = usec
}
end
end

Loading…
Cancel
Save