mirror of
https://github.com/koreader/koreader.git
synced 2025-08-10 00:52:38 +00:00
Allow for toggling color rendering
New menu item in Screen submenu. hasColorScreen enabled for SDL device.
This commit is contained in:
@@ -10,8 +10,10 @@ local PicDocument = Document:new{
|
||||
}
|
||||
|
||||
function PicDocument:init()
|
||||
self:updateColorRendering()
|
||||
if not pic then pic = require("ffi/pic") end
|
||||
pic.color = Screen:isColorEnabled()
|
||||
-- pic.color needs to be true before opening document to allow toggling color
|
||||
pic.color = Screen.isColorScreen()
|
||||
local ok
|
||||
ok, self._document = pcall(pic.openDocument, self.file)
|
||||
if not ok then
|
||||
|
||||
Reference in New Issue
Block a user