mirror of
https://github.com/yairm210/Unciv.git
synced 2025-07-07 00:41:39 +07:00
Fix Desktop window borders
This commit is contained in:
@ -156,9 +156,9 @@ class GameSettings {
|
||||
|
||||
when (screenWindow) {
|
||||
ScreenWindow.Windowed -> {
|
||||
val mode = Gdx.graphics.displayMode
|
||||
Gdx.graphics.setUndecorated(false)
|
||||
Gdx.graphics.setWindowedMode(mode.width, mode.height)
|
||||
Gdx.graphics.setWindowedMode(
|
||||
windowState.width.coerceAtLeast(120),
|
||||
windowState.height.coerceAtLeast(80))
|
||||
}
|
||||
|
||||
ScreenWindow.Fullscreen -> {
|
||||
|
@ -44,6 +44,7 @@ internal object DesktopLauncher {
|
||||
config.setWindowIcon("ExtraImages/Icon.png")
|
||||
config.setTitle("Unciv")
|
||||
config.setHdpiMode(HdpiMode.Logical)
|
||||
config.setMaximized(true)
|
||||
config.setWindowSizeLimits(120, 80, -1, -1)
|
||||
|
||||
// We don't need the initial Audio created in Lwjgl3Application, HardenGdxAudio will replace it anyway.
|
||||
@ -63,8 +64,6 @@ internal object DesktopLauncher {
|
||||
FileHandle(SETTINGS_FILE_NAME).writeString(json().toJson(settings), false) // so when we later open the game we get fullscreen
|
||||
}
|
||||
|
||||
config.setWindowedMode(settings.windowState.width.coerceAtLeast(120), settings.windowState.height.coerceAtLeast(80))
|
||||
|
||||
|
||||
if (!isRunFromJAR) {
|
||||
UniqueDocsWriter().write()
|
||||
|
Reference in New Issue
Block a user