|
|
|
@ -868,13 +868,12 @@ function Kobo:init()
|
|
|
|
|
for i = 0, tonumber(dev_count[0]) - 1 do
|
|
|
|
|
local dev = devices[i]
|
|
|
|
|
if dev.matched then
|
|
|
|
|
local path = ffi.string(dev.path)
|
|
|
|
|
-- We need to single out whichever device provides pagination buttons or sleep cover events, as we'll want to tweak key repeat there...
|
|
|
|
|
-- The first one will do, as it's extremely likely to be event0, and that's pretty fairly set in stone on NTX boards.
|
|
|
|
|
if (bit.band(dev.type, C.INPUT_PAGINATION_BUTTONS) ~= 0 or bit.band(dev.type, C.INPUT_SLEEP_COVER) ~= 0) and not self.ntx_fd then
|
|
|
|
|
self.ntx_fd = self.input.open(path, ffi.string(dev.name))
|
|
|
|
|
self.ntx_fd = self.input.open(ffi.string(dev.path), ffi.string(dev.name))
|
|
|
|
|
else
|
|
|
|
|
self.input.open(path, ffi.string(dev.name))
|
|
|
|
|
self.input.open(ffi.string(dev.path), ffi.string(dev.name))
|
|
|
|
|
end
|
|
|
|
|
end
|
|
|
|
|
end
|
|
|
|
|