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:
1 parent
945c4b3470
commit
d7b747d6dd
4 files changed
+21
-15
No files matched your search
+1
-1
@@ -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