From 2ac1699321cfc5a56f4dff25a74c6c43fc8169b4 Mon Sep 17 00:00:00 2001 From: yairm210 Date: Sun, 29 Sep 2024 23:42:34 +0300 Subject: [PATCH] Resolved ANRs when pausing game due to game clone time --- core/src/com/unciv/UncivGame.kt | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/core/src/com/unciv/UncivGame.kt b/core/src/com/unciv/UncivGame.kt index d879de4482..44d64cad33 100644 --- a/core/src/com/unciv/UncivGame.kt +++ b/core/src/com/unciv/UncivGame.kt @@ -399,7 +399,8 @@ open class UncivGame(val isConsoleMode: Boolean = false) : Game(), PlatformSpeci // already has, but if we do _our_ pause before the MusicController timer notices, it will at least remember the current track. if (::musicController.isInitialized) musicController.pause() val curGameInfo = gameInfo - if (curGameInfo != null) files.autosaves.requestAutoSave(curGameInfo) + // Since we're pausing the game, we don't need to clone it before autosave - no one else will touch it + if (curGameInfo != null) files.autosaves.requestAutoSaveUnCloned(curGameInfo) super.pause() }