Koreader won't start on Kobo without frontlight, powerd.fl may be nil.

pull/1928/head
hzj-jie 8 years ago committed by Hzj_jie
parent 9a3e262bb3
commit d1e8b8098d

@ -117,6 +117,7 @@ end
-- restore kobo frontlight settings and probe kobo touch coordinates
if Device:isKobo() then
if Device.hasFrontlight then
local powerd = Device:getPowerDevice()
if powerd and powerd.restore_settings then
-- UIManager:init() should have sanely set up the frontlight_stuff by this point
@ -135,6 +136,7 @@ if Device:isKobo() then
powerd.fl:setBrightness(0)
end
end
end
if Device:getCodeName() == "trilogy" then
require("utils/kobo_touch_probe")
end

Loading…
Cancel
Save