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:
NiLuJe
2018-12-28 04:32:42 +01:00
committed by GitHub
parent 295cc55e03
commit f6743a45db
14 changed files with 232 additions and 83 deletions

View File

@@ -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()