* Allow locking the gyro to the current screen mode (i.e., orientation).
* Tweak the "sticky rota" option to work both ways
* More rotation constant usage instead of magic numbers
@ -332,6 +341,28 @@ function Device:setIgnoreInput(enable) return true end
-- Device specific method for toggling the GSensor
functionDevice:toggleGSensor(toggle)end
-- Whether or not the GSensor should be locked to the current orientation (i.e. Portrait <-> Inverted Portrait or Landscape <-> Inverted Landscape only)
functionDevice:lockGSensor(toggle)
ifnotself:hasGSensor()then
return
end
iftoggle==truethen
-- Lock GSensor to current roientation
self.isGSensorLocked=yes
elseiftoggle==falsethen
-- Unlock GSensor
self.isGSensorLocked=no
else
-- Toggle it
ifself:isGSensorLocked()then
self.isGSensorLocked=no
else
self.isGSensorLocked=yes
end
end
end
-- Device specific method for set custom light levels
help_text=_("When checked the rotation of the file browser and the reader will not affect each other"),
text=_("Keep current rotation across views"),
help_text=_([[
Whenchecked,thecurrentrotationwillbekeptwhenswitchingbetweenthefilebrowserandthereader,inbothdirections,andthatnomatterwhatthedocument's saved rotation or the default reader or file browser rotation may be.
Thismeansthatnothingwilleversneakarotationbehindyourback,youchooseyourdevice's rotation, and it stays that way.