mirror of
https://github.com/koreader/koreader.git
synced 2025-08-10 00:52:38 +00:00
Remarkable: support the mainline touchscreen (#10585)
This commit is contained in:
@@ -143,13 +143,6 @@ function Remarkable:init()
|
||||
wacom_protocol = true,
|
||||
}
|
||||
|
||||
self.input.open(self.input_wacom) -- Wacom
|
||||
self.input.open(self.input_ts) -- Touchscreen
|
||||
self.input.open(self.input_buttons) -- Buttons
|
||||
|
||||
local scalex = screen_width / self.mt_width
|
||||
local scaley = screen_height / self.mt_height
|
||||
|
||||
-- Assume input stuff is saner on mainline kernels...
|
||||
-- (c.f., https://github.com/koreader/koreader/issues/10012)
|
||||
local is_mainline = false
|
||||
@@ -164,6 +157,20 @@ function Remarkable:init()
|
||||
is_mainline = true
|
||||
end
|
||||
end
|
||||
|
||||
if is_mainline then
|
||||
self.input_wacom = "/dev/input/by-path/platform-30a20000.i2c-event-mouse"
|
||||
self.input_buttons = "/dev/input/by-path/platform-30370000.snvs:snvs-powerkey-event"
|
||||
self.input_ts = "/dev/input/touchscreen0"
|
||||
end
|
||||
|
||||
self.input.open(self.input_wacom) -- Wacom
|
||||
self.input.open(self.input_ts) -- Touchscreen
|
||||
self.input.open(self.input_buttons) -- Buttons
|
||||
|
||||
local scalex = screen_width / self.mt_width
|
||||
local scaley = screen_height / self.mt_height
|
||||
|
||||
if is_mainline then
|
||||
-- NOTE: The panel sends *both* ABS_MT_ & ABS_ coordinates, while the pen only sends ABS_ coordinates.
|
||||
-- Since we have to apply *different* mangling to each of them,
|
||||
|
||||
Reference in New Issue
Block a user