From ef08bda50d61ad14bb890002f1fee78691417ffd Mon Sep 17 00:00:00 2001 From: Yair Morgenstern Date: Sun, 15 May 2022 19:21:37 +0300 Subject: [PATCH] Revert "Use kotlin coroutines instead of raw threads (+ refactorings) (#6801)" This reverts commit f8e0f572 --- core/src/com/unciv/ui/utils/ExtensionFunctions.kt | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/core/src/com/unciv/ui/utils/ExtensionFunctions.kt b/core/src/com/unciv/ui/utils/ExtensionFunctions.kt index 0488d7f55f..3f60ca37fb 100644 --- a/core/src/com/unciv/ui/utils/ExtensionFunctions.kt +++ b/core/src/com/unciv/ui/utils/ExtensionFunctions.kt @@ -13,7 +13,7 @@ import com.unciv.UncivGame import com.unciv.models.UncivSound import com.unciv.models.translations.tr import com.unciv.ui.audio.Sounds -import com.unciv.ui.crashhandling.launchCrashHandling +import com.unciv.ui.crashhandling.crashHandlingThread import com.unciv.ui.images.IconCircleGroup import com.unciv.ui.images.ImageGetter import java.text.SimpleDateFormat @@ -67,7 +67,7 @@ fun Actor.center(parent: Stage){ centerX(parent); centerY(parent)} fun Actor.onClickEvent(sound: UncivSound = UncivSound.Click, function: (event: InputEvent?, x: Float, y: Float) -> Unit) { this.addListener(object : ClickListener() { override fun clicked(event: InputEvent?, x: Float, y: Float) { - launchCrashHandling("Sound") { Sounds.play(sound) } + crashHandlingThread(name = "Sound") { Sounds.play(sound) } function(event, x, y) } })