diff --git a/desktop/src/com/unciv/app/desktop/DesktopLauncher.kt b/desktop/src/com/unciv/app/desktop/DesktopLauncher.kt index e6ef75ad8d..37b0b74abf 100644 --- a/desktop/src/com/unciv/app/desktop/DesktopLauncher.kt +++ b/desktop/src/com/unciv/app/desktop/DesktopLauncher.kt @@ -91,8 +91,12 @@ internal object DesktopLauncher { UiElementDocsWriter().write() } + + val customDataDirPrefix="--data-dir=" + val customDataDir = arg.find { it.startsWith(customDataDirPrefix) }?.removePrefix(customDataDirPrefix) + // HardenGdxAudio extends Lwjgl3Application, and the Lwjgl3Application constructor runs as long as the game runs - HardenGdxAudio(DesktopGame(config, null), config) + HardenGdxAudio(DesktopGame(config, customDataDir), config) exitProcess(0) } }