mirror of
https://github.com/koreader/koreader.git
synced 2025-08-10 00:52:38 +00:00
Change util.isEmulated to boolean and fix frontlight
Device:hasFrontlight always returned a true-like value because util.isEmulated was an integer. Fixed this, also, used a polymorphic object design to reduce FrontLight code, and adapted BaseFrontLight for the emulator.
This commit is contained in:
@@ -24,7 +24,7 @@ function exitReader()
|
||||
|
||||
input.closeAll()
|
||||
|
||||
if util.isEmulated() == 0 then
|
||||
if not util.isEmulated() then
|
||||
if Device:isKindle3() or (Device:getModel() == "KindleDXG") then
|
||||
-- send double menu key press events to trigger screen refresh
|
||||
os.execute("echo 'send 139' > /proc/keypad;echo 'send 139' > /proc/keypad")
|
||||
|
||||
Reference in New Issue
Block a user