mirror of
https://github.com/koreader/koreader.git
synced 2025-08-10 00:52:38 +00:00
mod: screen rotation implemented by ioctl
Now you get a instance rotate :) With only one bug. I have to restore to previous rotation state of the native system after exists. Because the native system does poll the new rotation state that changed by ioctl. Currently, I don't know how to force the native system to detect the changes.
This commit is contained in:
@@ -114,6 +114,7 @@ fb = einkfb.open("/dev/fb0")
|
||||
width, height = fb:getSize()
|
||||
-- read current rotation mode
|
||||
Screen:updateRotationMode()
|
||||
origin_rotation_mode = Screen.cur_rotation_mode
|
||||
|
||||
-- set up reader's setting: font
|
||||
reader_settings = DocSettings:open(".reader")
|
||||
@@ -158,6 +159,10 @@ end
|
||||
reader_settings:savesetting("cfont", FontChooser.cfont)
|
||||
reader_settings:close()
|
||||
|
||||
-- @TODO dirty workaround, find a way to force native system poll
|
||||
-- screen orientation and upside down mode 09.03 2012
|
||||
fb:setOrientation(origin_rotation_mode)
|
||||
|
||||
input.closeAll()
|
||||
--os.execute('test -e /proc/keypad && echo "send '..KEY_HOME..'" > /proc/keypad ')
|
||||
if optarg["d"] ~= "emu" then
|
||||
|
||||
Reference in New Issue
Block a user