diff --git a/frontend/device/pocketbook/device.lua b/frontend/device/pocketbook/device.lua index 44bfbd429..2a7f106f7 100644 --- a/frontend/device/pocketbook/device.lua +++ b/frontend/device/pocketbook/device.lua @@ -63,6 +63,10 @@ local PocketBook = Generic:extend{ -- That historically wasn't the case, hence this defaulting to false. inkview_translates_buttons = false, + -- Some Pocketbook devices need special handling after resume to restore the correct orientation. + -- See https://github.com/koreader/koreader/issues/11033 for details. + needs_orientation_sync_after_resume = false, + -- Will be set appropriately at init isB288SoC = no, @@ -699,6 +703,7 @@ local PocketBook700 = PocketBook:extend{ hasNaturalLight = yes, -- c.f., https://github.com/koreader/koreader/issues/9556 inkview_translates_buttons = true, + needs_orientation_sync_after_resume = true, } -- PocketBook Era Color (PB700K3) @@ -712,6 +717,7 @@ local PocketBook700K3 = PocketBook:extend{ hasNaturalLight = yes, -- c.f., https://github.com/koreader/koreader/issues/9556 inkview_translates_buttons = true, + needs_orientation_sync_after_resume = true, } function PocketBook700K3._fb_init(fb, finfo, vinfo) diff --git a/frontend/device/pocketbook/powerd.lua b/frontend/device/pocketbook/powerd.lua index 9c754ee7e..4005e923b 100644 --- a/frontend/device/pocketbook/powerd.lua +++ b/frontend/device/pocketbook/powerd.lua @@ -88,10 +88,8 @@ function PocketBookPowerD:afterResume() -- Restore user input and emit the Resume event. self.device:_afterResume() - -- PB700-specific: Sync orientation after resume to fix hibernation rotation bug - -- c.f., https://github.com/koreader/koreader/issues/11033 - if self.device.model == "PB700" then - logger.dbg("afterResume: Running orientation sync for PB700") + if self.device.needs_orientation_sync_after_resume then + logger.dbg("afterResume: Running orientation sync") local current_orientation = inkview.GetGSensorOrientation() local current_rotation = self.device.screen:getRotationMode()