mirror of
https://github.com/koreader/koreader
synced 2024-10-31 21:20:20 +00:00
Use util.isEmulated for screenshot.
This commit is contained in:
parent
9e3ebe9496
commit
67efe2d4ca
@ -109,10 +109,11 @@ end
|
||||
|
||||
|
||||
function Screen:screenshot()
|
||||
local secs, usecs = util.gettime()
|
||||
if FileExists("/dev/fb0") then
|
||||
self:fb2bmp("/dev/fb0", lfs.currentdir().."/screenshots/"..os.date("%Y%m%d%H%M%S")..".bmp", true, nil)
|
||||
if util.isEmulated() == 1 then
|
||||
return
|
||||
end
|
||||
local secs, usecs = util.gettime()
|
||||
self:fb2bmp("/dev/fb0", lfs.currentdir().."/screenshots/"..os.date("%Y%m%d%H%M%S")..".bmp", true, nil)
|
||||
local nsecs, nusecs = util.gettime()
|
||||
local diff = nsecs - secs + (nusecs - usecs)/1000000
|
||||
--self:fb2bmp("/dev/fb0", lfs.currentdir().."/screenshots/"..os.date("%Y%m%d%H%M%S")..".bmp", true, "bzip2 ")
|
||||
|
Loading…
Reference in New Issue
Block a user