Update readerscreenshot.lua

This adds screenshot functionality for the Kobo Aura. 

The pam-files generated can be read and converted using Imagemagick for linux/windows.

I've added the infomessage because it takes 5+ tries to get a screenshot by tapping the lower left and upper right corners. The other diagonal is not working for the Kobo Aura yet.
pull/449/head
Markismus 11 years ago
parent 1fa321f8e6
commit ed46bcba5d

@ -22,7 +22,18 @@ function ReaderScreenshot:init()
end
function ReaderScreenshot:onScreenshot()
os.execute("screenshot")
if Device:getModel() ~= 'Kobo_phoenix' then
os.execute("screenshot")
else Screen.bb:invert()
local screenshot_name = os.date("screenshots/Screenshot_%Y-%B-%d_%Hh%M.pam")
UIManager:show(InfoMessage:new{
text = _("Writing screen to "..screenshot_name),
timeout = 2,
})
Screen.bb:writePAM(screenshot_name)
DEBUG(screenshot_name)
Screen.bb:invert()
end
UIManager.full_refresh = true
return true
end

Loading…
Cancel
Save