Quote:
Originally Posted by Tialex
Anyway, the script below works for any file (epub, pdf) and probably for any view of the program. Anyone who want to force the program rotation (vs system) for KoReader 2023.08 should create the file named 1-force-soft-rot.lua in the sdcard/koreader/patches directory with the following text
Code:
local logger = require("logger")
local frBuffer = require("ffi/framebuffer_android")
frBuffer.setRotationMode = function(self, mode)
logger.info("Forcing software rotation")
frBuffer.parent.setRotationMode(self, mode)
end
frBuffer.getRotationMode = function(self)
return self.cur_rotation_mode
end
|
Thank you! On my device, an old tablet with Android 8.1, the script worked correctly even when I set the tablet to auto-rotate.