Merge pull request #69 from chrox/master

bugfix: use ceil to keep index greater than or equal to 1
pull/71/merge
{Qingping,Dave} Hou 11 years ago
commit 133cf2954e

@ -31,7 +31,7 @@ end
function ReaderFrontLight:onAdjust(arg, ges)
if self.lipc_handle then
local rel_proportion = ges.distance / Screen:getWidth()
local delta_int = self.steps[math.floor(#self.steps*rel_proportion)]
local delta_int = self.steps[math.ceil(#self.steps*rel_proportion)]
local msg = ""
if ges.direction == "north" then
msg = _("Increase front light intensity to ")

Loading…
Cancel
Save