mirror of
https://github.com/koreader/koreader.git
synced 2025-08-10 00:52:38 +00:00
Proper Forma support (#4414)
* Enforce a known rotation on startup, to make sure we handle touch input coordinates properly. * Proper FrontLight warmth support (thanks to @cairnsh & @pazos in #4291)! * Fix the PageTurn buttons mapping to match Nickel's defaults * Properly remap PageTurn buttons depending on the current rotation. * Actually enable the Mk.7 screen refresh codepath on *all* Mk.7 devices (I'd messed up the device check...). * Full accelerometer handling (includes a touch of refactoring regarding orientation handling in general). * Fix insidiously broken USBMS behavior in Nickel after we exit on FW >4.8. Fix #4291 Fix #3002
This commit is contained in:
@@ -639,11 +639,12 @@ function ReaderRolling:onSetDimensions(dimen)
|
||||
self.ui.document:setViewDimen(Screen:getSize())
|
||||
end
|
||||
|
||||
function ReaderRolling:onChangeScreenMode(mode)
|
||||
function ReaderRolling:onChangeScreenMode(mode, rotation)
|
||||
-- We need to temporarily re-enable internal history as crengine
|
||||
-- uses it to reposition after resize
|
||||
self.ui.document:enableInternalHistory(true)
|
||||
self.ui:handleEvent(Event:new("SetScreenMode", mode))
|
||||
-- Flag it as interactive so we can properly swap to Inverted orientations (we usurp the second argument, which usually means rotation)
|
||||
self.ui:handleEvent(Event:new("SetScreenMode", mode, rotation or true))
|
||||
self.ui.document:setViewDimen(Screen:getSize())
|
||||
self:onChangeViewMode()
|
||||
self:onUpdatePos()
|
||||
|
||||
Reference in New Issue
Block a user