Skip to content

Commit

Permalink
UIManager: Don't lose track of the original rotation on reboot/powero…
Browse files Browse the repository at this point in the history
…ff (#9606)

And, actually, stop enforcing Portrait; Screensaver already handles
rotation as necessary depending on the exact screensaver mode.

Fix https://www.mobileread.com/forums/showthread.php?t=349522
  • Loading branch information
NiLuJe committed Oct 7, 2022
1 parent c0dffe2 commit 93ae341
Showing 1 changed file with 0 additions and 4 deletions.
4 changes: 0 additions & 4 deletions frontend/ui/uimanager.lua
Original file line number Diff line number Diff line change
Expand Up @@ -61,9 +61,7 @@ function UIManager:init()
self.poweroff_action = function()
self._entered_poweroff_stage = true
logger.info("Powering off the device...")
Device.orig_rotation_mode = Device.screen:getRotationMode()
self:broadcastEvent(Event:new("Close"))
Screen:setRotationMode(Screen.ORIENTATION_PORTRAIT)
local Screensaver = require("ui/screensaver")
Screensaver:setup("poweroff", _("Powered off"))
Screensaver:show()
Expand All @@ -76,9 +74,7 @@ function UIManager:init()
self.reboot_action = function()
self._entered_poweroff_stage = true
logger.info("Rebooting the device...")
Device.orig_rotation_mode = Device.screen:getRotationMode()
self:broadcastEvent(Event:new("Close"))
Screen:setRotationMode(Screen.ORIENTATION_PORTRAIT)
local Screensaver = require("ui/screensaver")
Screensaver:setup("reboot", _("Rebooting…"))
Screensaver:show()
Expand Down

0 comments on commit 93ae341

Please sign in to comment.