[fix, SDL] Remove useless Device call from exit (#9443)

Fixes #9439.
reviewable/pr9445/r1
Frans de Jonge 2 years ago committed by GitHub
parent 939a64438a
commit f8e888c832
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

@ -547,14 +547,9 @@ function Input:handleKeyBoardEv(ev)
-- quit on Alt + F4
-- this is also emitted by the close event in SDL
if self:isEvKeyPress(ev) and self.modifiers["Alt"] and keycode == "F4" then
local Device = require("frontend/device")
local UIManager = require("ui/uimanager")
local save_quit = function()
Device:saveSettings()
UIManager:quit()
end
UIManager:broadcastEvent(Event:new("Exit", save_quit))
UIManager:broadcastEvent(Event:new("Close")) -- Tell all widgets to close.
UIManager:nextTick(function() UIManager:quit() end) -- Ensure the program closes in case of some lingering dialog.
end
-- handle modifier keys

Loading…
Cancel
Save