Fix debug logging in the framebuffer module

Regression since 02eca23649
This commit is contained in:
NiLuJe
2019-09-11 20:00:44 +02:00
committed by Frans de Jonge
parent 4363576066
commit 1eb442a24a

View File

@@ -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")