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:
chrox
2015-10-18 00:12:06 +08:00
parent a043d8873b
commit 9654e9ce6c
5 changed files with 104 additions and 4 deletions

View File

@@ -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