Closed pazos closed 2 years ago
Hmm: I get a strange crash:
I/KOReader(10200): framebuffer resolution: {
I/KOReader(10200): ["w"] = 1072,
I/KOReader(10200): ["h"] = 1448,
I/KOReader(10200): }
E/NativeThread(10200): Failed to run script: [string "android.lua"]:2265: cannot convert 'string' to 'int'
V/NativeGlue(10200): Pause: 0x62cfc530
Maybe I did something wrong?
Nah, it is my bad. Could you try with
diff --git a/assets/android.lua b/assets/android.lua
index 0ddb542..487f3fd 100644
--- a/assets/android.lua
+++ b/assets/android.lua
@@ -2350,8 +2350,14 @@ local function run(android_app_state)
"getEinkConstants",
"()Ljava/lang/String;"
)
- return string.match(jni:to_string(constants),
- "(.*);(.*);(.*);(.*);(.*);(.*);(.*);(.*)")
+
+ local full, partial, full_ui, partial_ui, fast, delay, delay_ui, delay_fast = string.match(
+ jni:to_string(constants),
+ "(.*);(.*);(.*);(.*);(.*);(.*);(.*);(.*)"
+ )
+ return tonumber(full), tonumber(partial), tonumber(full_ui), tonumber(partial_ui),
+ tonumber(fast), tonumber(delay), tonumber(delay_ui), tonumber(delay_fast)
+
end)
end
???
No crash now ;) I don't see any drawbacks on the first view.
I didn't look at the code but it works on Onyx Nova 2 too.
Looks much better to an outsider now ;).
Makes easier to handle outliers. Required for https://github.com/koreader/koreader/issues/4551#issuecomment-931370121.
Untested. Pinging @zwim and @Galunid. Does the app work fine with this PR in?
This change is