diff --git a/frontend/ui/device/screen.lua b/frontend/ui/device/screen.lua index 8045eb2c6..aaa9fc87b 100644 --- a/frontend/ui/device/screen.lua +++ b/frontend/ui/device/screen.lua @@ -31,6 +31,7 @@ Codes for rotation modes: local Screen = { cur_rotation_mode = 0, native_rotation_mode = nil, + blitbuffer_rotation_mode = 0, bb = nil, saved_bb = nil, @@ -42,6 +43,7 @@ local Screen = { function Screen:init() self.bb = self.fb.bb + self.blitbuffer_rotation_mode = self.bb:getRotation() -- asking the framebuffer for orientation is error prone, -- so we do this simple heuristic (for now) if self:getWidth() > self:getHeight() then @@ -103,7 +105,7 @@ function Screen:getScreenMode() end function Screen:setRotationMode(mode) - self.fb.bb:rotateAbsolute(-90 * (mode - self.native_rotation_mode)) + self.fb.bb:rotateAbsolute(-90 * (mode - self.native_rotation_mode - self.blitbuffer_rotation_mode)) self.cur_rotation_mode = mode end diff --git a/koreader-base b/koreader-base index ef385ae00..2ec1e66a2 160000 --- a/koreader-base +++ b/koreader-base @@ -1 +1 @@ -Subproject commit ef385ae0073a26e129aa731b978916316cd0629f +Subproject commit 2ec1e66a21ce6b32435845f9f4f8e5184af2e0a4