mirror of
https://github.com/koreader/koreader.git
synced 2025-08-10 00:52:38 +00:00
H2O: Fix initial tap detection (#6832)
* Fix initial tap on the H2O There's no slot 0, so make sure the initialState doesn't get confused by input's init data that otherwise assumes the main slot is 0
This commit is contained in:
@@ -89,8 +89,11 @@ local KoboDaylight = Kobo:new{
|
||||
local KoboDahlia = Kobo:new{
|
||||
model = "Kobo_dahlia",
|
||||
hasFrontlight = yes,
|
||||
-- NOTE: The hardware can technically track 2 different fingers, but we don't seem to be able to figure it out...
|
||||
hasMultitouch = no,
|
||||
touch_phoenix_protocol = true,
|
||||
-- There's no slot 0, the first finger gets assigned slot 1, and the second slot 2
|
||||
main_finger_slot = 1,
|
||||
display_dpi = 265,
|
||||
-- the bezel covers the top 11 pixels:
|
||||
viewport = Geom:new{x=0, y=11, w=1080, h=1429},
|
||||
@@ -310,6 +313,16 @@ function Kobo:init()
|
||||
}
|
||||
self.wakeup_mgr = WakeupMgr:new()
|
||||
|
||||
-- Tweak initial slot, if necessary
|
||||
if self.main_finger_slot then
|
||||
self.input.cur_slot = self.main_finger_slot
|
||||
self.input.ev_slots = {
|
||||
[self.main_finger_slot] = {
|
||||
slot = self.main_finger_slot,
|
||||
}
|
||||
}
|
||||
end
|
||||
|
||||
Generic.init(self)
|
||||
|
||||
-- When present, event2 is the raw accelerometer data (3-Axis Orientation/Motion Detection)
|
||||
|
||||
Reference in New Issue
Block a user