Kobo: On sunxi, add a delay between the white flash and the sleep

screen.

Otherwise, on the Sage, weird flash glitches may happen, depending on
what was on screen...
(e.g., there's some weird update merging shenanigans going on
despite those updates being flagged NO_MERGE...).
This commit is contained in:
NiLuJe
2021-10-31 23:50:03 +01:00
parent 98b53b0390
commit 1ff19f8ba7

View File

@@ -9,7 +9,8 @@ local Geom = require("ui/geometry")
local logger = require("logger")
local util = require("util")
local _ = require("gettext")
local T = require("ffi/util").template
local ffiUtil = require("ffi/util")
local T = ffiUtil.template
local function yes() return true end
local function no() return false end
@@ -307,6 +308,11 @@ function Device:onPowerEvent(ev)
self.screen:clear()
end
self.screen:refreshFull()
-- On Kobo, on sunxi SoCs with a recent kernel, wait a tiny bit more to avoid weird refresh glitches...
if self:isKobo() and self:isSunxi() then
ffiUtil.usleep(150 * 1000)
end
end
else
-- nil it, in case user switched ScreenSaver modes during our lifetime.