Skip to content

Commit

Permalink
Merge pull request #261 from Frenzie/master
Browse files Browse the repository at this point in the history
Add workaround for Kobo front light (deprecates KOBO_LIGHT_OFF_ON_SUSPEN...
  • Loading branch information
houqp committed Nov 9, 2014
2 parents fc8da57 + ef9219b commit ad2b2b6
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions ffi/kobolight.lua
Original file line number Diff line number Diff line change
Expand Up @@ -36,6 +36,11 @@ function kobolight_mt.__index:sleep()
self:toggle()
else
self.sleepLight = false
-- Because the brightness value cannot be read, the front light
-- could be on even is isOn is false. This can happen if the light
-- was enabled in e.g. KSM or Nickel before starting KOReader.
-- Therefore, always set brightness to 0 just in case.
self:setBrightness(0)
end
end

Expand Down

0 comments on commit ad2b2b6

Please sign in to comment.