SDL: Fix initial position & size

Also keep sdl_window in sync with enforced dimensions on the emu.
This commit is contained in:
NiLuJe
2023-06-27 21:33:00 +02:00
committed by Frans de Jonge
parent 4ae25794a8
commit 5c8143d9ac

View File

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