SDL: Fix initial position & size

Also keep sdl_window in sync with enforced dimensions on the emu.
reviewable/pr10625/r1
NiLuJe 11 months ago committed by Frans de Jonge
parent 4ae25794a8
commit 5c8143d9ac

@ -172,6 +172,9 @@ function Device:init()
y = self.window.top,
is_always_portrait = self.isAlwaysPortrait(),
}
-- Pickup the updated window sizes if they were enforced in S.open (we'll get the coordinates via the inital SDL_WINDOWEVENT_MOVED)...
self.window.width = self.screen.w
self.window.height = self.screen.h
self.powerd = require("device/sdl/powerd"):new{device = self}
local ok, re = pcall(self.screen.setWindowIcon, self.screen, "resources/koreader.png")

Loading…
Cancel
Save