mirror of
https://github.com/koreader/koreader.git
synced 2025-12-13 20:36:53 +01:00
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.
This commit is contained in:
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user