ANR: Disable input while building crash screen
Some checks failed
Conflict marking / main (push) Failing after -9s
Detekt / detekt (ubuntu-latest) (push) Failing after 20s
Docker / build (push) Failing after 31s
Generate mkdocs from docs folder / deploy (push) Failing after 14s
Build and test / Check code and run unit tests (push) Failing after 41m50s
Close stale issues and PRs / stale (push) Successful in 13s

This commit is contained in:
yairm210 2024-12-01 12:48:23 +02:00
parent e5c20f78dd
commit ba7c9def64

View File

@ -462,6 +462,9 @@ open class UncivGame(val isConsoleMode: Boolean = false) : Game(), PlatformSpeci
// ignore
}
Gdx.app.postRunnable {
Gdx.input.inputProcessor = null // CrashScreen needs to toJson which can take a while
// This may not be enough, we may need to run "generate crash text" in a different thread,
// but for now let's try this.
setAsRootScreen(CrashScreen(ex))
}
}