mirror of
https://github.com/yairm210/Unciv.git
synced 2025-07-04 07:17:50 +07:00
Hopefully got rid of ANRs when entering a link when the app has been closed for too long? I think that's the problem?
This commit is contained in:
@ -75,6 +75,7 @@ class UncivGame(parameters: UncivGameParameters) : Game() {
|
|||||||
val translations = Translations()
|
val translations = Translations()
|
||||||
|
|
||||||
override fun create() {
|
override fun create() {
|
||||||
|
isInitialized = false // this could be on reload, therefore we need to keep setting this to false
|
||||||
Gdx.input.setCatchKey(Input.Keys.BACK, true)
|
Gdx.input.setCatchKey(Input.Keys.BACK, true)
|
||||||
if (Gdx.app.type != Application.ApplicationType.Desktop) {
|
if (Gdx.app.type != Application.ApplicationType.Desktop) {
|
||||||
viewEntireMapForDebug = false
|
viewEntireMapForDebug = false
|
||||||
@ -166,7 +167,8 @@ class UncivGame(parameters: UncivGameParameters) : Game() {
|
|||||||
fun tryLoadDeepLinkedGame() {
|
fun tryLoadDeepLinkedGame() {
|
||||||
if (deepLinkedMultiplayerGame != null) {
|
if (deepLinkedMultiplayerGame != null) {
|
||||||
try {
|
try {
|
||||||
loadGame(OnlineMultiplayer().tryDownloadGame(deepLinkedMultiplayerGame!!))
|
val onlineGame = OnlineMultiplayer().tryDownloadGame(deepLinkedMultiplayerGame!!)
|
||||||
|
loadGame(onlineGame)
|
||||||
} catch (ex: Exception) {
|
} catch (ex: Exception) {
|
||||||
setScreen(MainMenuScreen())
|
setScreen(MainMenuScreen())
|
||||||
}
|
}
|
||||||
|
Reference in New Issue
Block a user