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:
18
reader.lua
18
reader.lua
@@ -34,6 +34,24 @@ if lang_locale then
|
||||
_.changeLang(lang_locale)
|
||||
end
|
||||
|
||||
-- Make the C blitter optional (ffi/blitbuffer.lua will check that env var)
|
||||
local ffi = require("ffi")
|
||||
local dummy = require("ffi/posix_h")
|
||||
local C = ffi.C
|
||||
if G_reader_settings:isTrue("dev_no_c_blitter") then
|
||||
if ffi.os == "Windows" then
|
||||
C._putenv("KO_NO_CBB=true")
|
||||
else
|
||||
C.setenv("KO_NO_CBB", "true", 1)
|
||||
end
|
||||
else
|
||||
if ffi.os == "Windows" then
|
||||
C._putenv("KO_NO_CBB=false")
|
||||
else
|
||||
C.unsetenv("KO_NO_CBB")
|
||||
end
|
||||
end
|
||||
|
||||
local Device = require("device")
|
||||
local dpi_override = G_reader_settings:readSetting("screen_dpi")
|
||||
if dpi_override ~= nil then
|
||||
|
||||
Reference in New Issue
Block a user