Main: Move the G_reader_settings flush to Device:exit

I don't trust PB's input.closeAll not to be doing something wonky that
would trip an early abort.
reviewable/pr10841/r1
NiLuJe 8 months ago
parent d1bbdb5dad
commit 21de1a832e

@ -545,8 +545,13 @@ function Device:exit()
-- Restore initial HW inversion state
self.screen:setHWNightmode(self.orig_hw_nightmode)
-- I/O teardown
-- Tear down the fb backend
self.screen:close()
-- Flush settings to disk
G_reader_settings:close()
-- I/O teardown
require("ffi/input"):closeAll()
end

@ -292,12 +292,9 @@ end
-- Exit
local function exitReader()
-- Shutdown hardware abstraction
-- Shutdown hardware abstraction (it'll also flush G_reader_settings to disk)
Device:exit()
-- Flush settings to disk
G_reader_settings:close()
if Profiler then Profiler.stop() end
if type(exit_code) == "number" then

Loading…
Cancel
Save