mirror of
https://github.com/koreader/koreader.git
synced 2025-12-13 20:36:53 +01:00
fix #1608 with touch coordinates detection
Some kobo touch devices have X Y coordinates in touch events swapped. This patch provides a GUI to probe if the device needs to swap the XY. The Kobo Touch users will be directed to tap on the upper right corner of the screen and the probe will check if the X value is smaller than the Y value in the tap event.
This commit is contained in:
@@ -112,7 +112,7 @@ if G_reader_settings:readSetting("night_mode") then
|
||||
Screen:toggleNightMode()
|
||||
end
|
||||
|
||||
-- restore kobo frontlight settings
|
||||
-- restore kobo frontlight settings and probe kobo touch coordinates
|
||||
if Device:isKobo() then
|
||||
local powerd = Device:getPowerDevice()
|
||||
if powerd and powerd.restore_settings then
|
||||
@@ -121,6 +121,9 @@ if Device:isKobo() then
|
||||
powerd:setIntensityWithoutHW(intensity)
|
||||
-- powerd:setIntensity(intensity)
|
||||
end
|
||||
if Device:getCodeName() == "trilogy" then
|
||||
require("utils/kobo_touch_proble")
|
||||
end
|
||||
end
|
||||
|
||||
if ARGV[argidx] and ARGV[argidx] ~= "" then
|
||||
|
||||
Reference in New Issue
Block a user