mirror of
https://github.com/koreader/koreader.git
synced 2025-08-10 00:52:38 +00:00
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.
This commit is contained in:
@@ -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
|
||||
|
||||
|
||||
Reference in New Issue
Block a user