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:
@@ -3,11 +3,8 @@ A.dl.library_path = A.dl.library_path .. ":" .. A.dir .. "/libs"
|
||||
A.log_name = 'KOReader'
|
||||
|
||||
local ffi = require("ffi")
|
||||
local dummy = require("ffi/posix_h")
|
||||
local C = ffi.C
|
||||
ffi.cdef[[
|
||||
char *getenv(const char *name);
|
||||
int putenv(const char *envvar);
|
||||
]]
|
||||
|
||||
-- check uri of the intent that starts this application
|
||||
local file = A.getIntent()
|
||||
@@ -26,7 +23,7 @@ A.execute("chmod", "755", "./tar")
|
||||
A.execute("chmod", "755", "./zsync")
|
||||
|
||||
-- set TESSDATA_PREFIX env var
|
||||
C.putenv("TESSDATA_PREFIX=/sdcard/koreader/data")
|
||||
C.setenv("TESSDATA_PREFIX", "/sdcard/koreader/data", 1)
|
||||
|
||||
-- create fake command-line arguments
|
||||
arg = {"-d", file or "/sdcard"}
|
||||
|
||||
Reference in New Issue
Block a user