mirror of
https://github.com/koreader/koreader
synced 2024-11-10 01:10:34 +00:00
38e7975728
* Make toggling Gyro events more robust Actually ask to turn it on/off depending on the setting, instead of a blind toggle A quick succession of suspend/resume events could otherwise leave it in an unexpected state (i.e., off when it should have been on).
14 lines
414 B
Lua
14 lines
414 B
Lua
local Device = require("device")
|
|
local _ = require("gettext")
|
|
|
|
return {
|
|
text = _("Ignore accelerometer rotation events"),
|
|
checked_func = function()
|
|
return G_reader_settings:isTrue("input_ignore_gsensor")
|
|
end,
|
|
callback = function()
|
|
G_reader_settings:flipNilOrFalse("input_ignore_gsensor")
|
|
Device:toggleGSensor(not G_reader_settings:isTrue("input_ignore_gsensor"))
|
|
end,
|
|
}
|