Fix OpenAL error Windows Events after application ends (#10551)

* Move exitProcess to a better place

* Fix OpenAL error Windows Events after application ends

* Extensive commenting
This commit is contained in:
SomeTroglodyte
2023-11-25 17:22:39 +01:00
committed by GitHub
parent 8c0693c998
commit b8facadf7a
5 changed files with 65 additions and 64 deletions

View File

@ -51,7 +51,6 @@ import java.io.PrintWriter
import java.util.EnumSet
import java.util.UUID
import kotlinx.coroutines.CancellationException
import kotlin.system.exitProcess
open class UncivGame(val isConsoleMode: Boolean = false) : Game(), PlatformSpecific {
@ -412,7 +411,7 @@ open class UncivGame(val isConsoleMode: Boolean = false) : Game(), PlatformSpeci
// On desktop this should only be this one and "DestroyJavaVM"
logRunningThreads()
exitProcess(0)
// DO NOT `exitProcess(0)` - bypasses all Gdx and GLFW cleanup
}
private fun logRunningThreads() {