From ff30d123c0c69d3b4bb5783bfb575a904dc6ee57 Mon Sep 17 00:00:00 2001 From: yairm210 Date: Wed, 8 Jan 2025 20:26:19 +0200 Subject: [PATCH] LibGDX 1.13.1 --- buildSrc/src/main/kotlin/BuildConfig.kt | 2 +- desktop/build.gradle.kts | 6 ------ desktop/src/com/unciv/app/desktop/DesktopLauncher.kt | 5 +++++ 3 files changed, 6 insertions(+), 7 deletions(-) diff --git a/buildSrc/src/main/kotlin/BuildConfig.kt b/buildSrc/src/main/kotlin/BuildConfig.kt index c4c765fba08dc..a489b9f4ce4fe 100644 --- a/buildSrc/src/main/kotlin/BuildConfig.kt +++ b/buildSrc/src/main/kotlin/BuildConfig.kt @@ -7,7 +7,7 @@ object BuildConfig { const val appCodeNumber = 1089 const val appVersion = "4.15.1" - const val gdxVersion = "1.12.1" + const val gdxVersion = "1.13.1" const val ktorVersion = "2.3.12" const val coroutinesVersion = "1.8.1" diff --git a/desktop/build.gradle.kts b/desktop/build.gradle.kts index 4391573154c68..b650b59076045 100644 --- a/desktop/build.gradle.kts +++ b/desktop/build.gradle.kts @@ -1,6 +1,5 @@ import com.unciv.build.BuildConfig -import com.unciv.build.BuildConfig.gdxVersion plugins { id("kotlin") @@ -23,11 +22,6 @@ java { targetCompatibility = JavaVersion.VERSION_1_8 } -dependencies { - // See https://libgdx.com/news/2021/07/devlog-7-lwjgl3#do-i-need-to-do-anything-else - api("com.badlogicgames.gdx:gdx-lwjgl3-glfw-awt-macos:$gdxVersion") -} - val mainClassName = "com.unciv.app.desktop.DesktopLauncher" val assetsDir = file("../android/assets") val discordDir = file("discord_rpc") diff --git a/desktop/src/com/unciv/app/desktop/DesktopLauncher.kt b/desktop/src/com/unciv/app/desktop/DesktopLauncher.kt index 41662ab1aaeb9..bd6530a6ca39c 100644 --- a/desktop/src/com/unciv/app/desktop/DesktopLauncher.kt +++ b/desktop/src/com/unciv/app/desktop/DesktopLauncher.kt @@ -3,6 +3,7 @@ package com.unciv.app.desktop import com.badlogic.gdx.backends.lwjgl3.Lwjgl3ApplicationConfiguration import com.badlogic.gdx.files.FileHandle import com.badlogic.gdx.graphics.glutils.HdpiMode +import com.badlogic.gdx.utils.SharedLibraryLoader import com.unciv.app.desktop.DesktopScreenMode.Companion.getMaximumWindowBounds import com.unciv.json.json import com.unciv.logic.files.SETTINGS_FILE_NAME @@ -18,6 +19,7 @@ import com.unciv.ui.components.fonts.Fonts import com.unciv.ui.screens.basescreen.BaseScreen import com.unciv.utils.Display import com.unciv.utils.Log +import org.lwjgl.system.Configuration import java.io.File import kotlin.system.exitProcess @@ -25,6 +27,9 @@ internal object DesktopLauncher { @JvmStatic fun main(arg: Array) { + if (SharedLibraryLoader.isMac) { + Configuration.GLFW_LIBRARY_NAME.set("glfw_async") + } // The uniques checker requires the file system to be seet up, which happens after lwjgw initializes it if (arg.isNotEmpty() && arg[0] == "mod-ci") {