mirror of
https://github.com/koreader/koreader.git
synced 2025-08-10 00:52:38 +00:00
Fix debug logging in the framebuffer module
Regression since 02eca23649
This commit is contained in:
28
reader.lua
28
reader.lua
@@ -52,14 +52,11 @@ else
|
||||
end
|
||||
end
|
||||
|
||||
local Device = require("device")
|
||||
local dpi_override = G_reader_settings:readSetting("screen_dpi")
|
||||
if dpi_override ~= nil then
|
||||
Device:setScreenDPI(dpi_override)
|
||||
end
|
||||
|
||||
local CanvasContext = require("document/canvascontext")
|
||||
CanvasContext:init(Device)
|
||||
-- should check DEBUG option in arg and turn on DEBUG before loading other
|
||||
-- modules, otherwise DEBUG in some modules may not be printed.
|
||||
local dbg = require("dbg")
|
||||
if G_reader_settings:isTrue("debug") then dbg:turnOn() end
|
||||
if G_reader_settings:isTrue("debug") and G_reader_settings:isTrue("debug_verbose") then dbg:setVerbose(true) end
|
||||
|
||||
-- option parsing:
|
||||
local longopts = {
|
||||
@@ -86,12 +83,6 @@ local function showusage()
|
||||
print("See http://github.com/koreader/koreader for more info.")
|
||||
end
|
||||
|
||||
-- should check DEBUG option in arg and turn on DEBUG before loading other
|
||||
-- modules, otherwise DEBUG in some modules may not be printed.
|
||||
local dbg = require("dbg")
|
||||
if G_reader_settings:isTrue("debug") then dbg:turnOn() end
|
||||
if G_reader_settings:isTrue("debug") and G_reader_settings:isTrue("debug_verbose") then dbg:setVerbose(true) end
|
||||
|
||||
local Profiler = nil
|
||||
local ARGV = arg
|
||||
local argidx = 1
|
||||
@@ -121,6 +112,15 @@ while argidx <= #ARGV do
|
||||
end
|
||||
end
|
||||
|
||||
local Device = require("device")
|
||||
local dpi_override = G_reader_settings:readSetting("screen_dpi")
|
||||
if dpi_override ~= nil then
|
||||
Device:setScreenDPI(dpi_override)
|
||||
end
|
||||
|
||||
local CanvasContext = require("document/canvascontext")
|
||||
CanvasContext:init(Device)
|
||||
|
||||
local ConfirmBox = require("ui/widget/confirmbox")
|
||||
local QuickStart = require("ui/quickstart")
|
||||
local UIManager = require("ui/uimanager")
|
||||
|
||||
Reference in New Issue
Block a user