mirror of
https://github.com/koreader/koreader.git
synced 2025-08-10 00:52:38 +00:00
* Add a toggle to disable the C blitter in the Dev menu (depends on https://github.com/koreader/koreader-base/pull/882) (never shown if the JIT is disabled, grayed out if the C blitter is not installed) * Fix a few sizeUtf8Text call sites that were doing a nil check in order to account for the new return type. * Tweak statusbar handling to avoid spurious sizeUtf8Text warnings when it's hidden, and unify its behavior between being hidden via toggle, and hidden on book open (at least when all-at-once is not enabled). * c.f., https://github.com/koreader/koreader-base/pull/882 (Android, PB, RGB32 & Legacy Kindle regression fixes).
This commit is contained in:
@@ -260,6 +260,29 @@ function FileManagerMenu:setUpdateItemTable()
|
||||
end,
|
||||
callback = function()
|
||||
G_reader_settings:flipNilOrFalse("dev_startup_no_fbdepth")
|
||||
local InfoMessage = require("ui/widget/infomessage")
|
||||
UIManager:show(InfoMessage:new{
|
||||
text = _("This will take effect on next restart."),
|
||||
})
|
||||
end,
|
||||
})
|
||||
end
|
||||
if not Device.should_restrict_JIT then
|
||||
table.insert(self.menu_items.developer_options.sub_item_table, {
|
||||
text = _("Disable C blitter"),
|
||||
enabled_func = function()
|
||||
local lfs = require("libs/libkoreader-lfs")
|
||||
return lfs.attributes("libs/libblitbuffer.so", "mode") == "file"
|
||||
end,
|
||||
checked_func = function()
|
||||
return G_reader_settings:isTrue("dev_no_c_blitter")
|
||||
end,
|
||||
callback = function()
|
||||
G_reader_settings:flipNilOrFalse("dev_no_c_blitter")
|
||||
local InfoMessage = require("ui/widget/infomessage")
|
||||
UIManager:show(InfoMessage:new{
|
||||
text = _("This will take effect on next restart."),
|
||||
})
|
||||
end,
|
||||
})
|
||||
end
|
||||
|
||||
Reference in New Issue
Block a user