From ee278586e740cc3b1494f0c3ff21603487ec4814 Mon Sep 17 00:00:00 2001 From: Yair Morgenstern Date: Mon, 14 Jan 2019 21:57:09 +0200 Subject: [PATCH] Solved #413 probable (ANR trying to load super-huge autosave game) by disabling the update() in the initialize, instead setting shouldUpdate to true by default so it'll update in the rendering thread --- README.md | 6 +++--- android/build.gradle | 2 +- core/src/com/unciv/ui/worldscreen/WorldScreen.kt | 9 ++++----- 3 files changed, 8 insertions(+), 9 deletions(-) diff --git a/README.md b/README.md index d69941ba79..0e3d340abd 100644 --- a/README.md +++ b/README.md @@ -12,7 +12,7 @@ Made with LibGDX on Android Studio # What's been implemented? -* Map tiles, resources and improvements +* Map tiles (including water), resources and improvements * Units and movement * Cities, production and buildings * Population and Specialists @@ -20,12 +20,12 @@ Made with LibGDX on Android Studio * Combat and barbarians * Promotions and combat modifiers * Other civilizations, diplomacy and trade +* Hotseat multiplayer # What's next? * UI+UX improvements (suggestions welcome!) - -* Water tiles! +* Map editor ## So, does it work? diff --git a/android/build.gradle b/android/build.gradle index eada1876bc..c94c8dac84 100644 --- a/android/build.gradle +++ b/android/build.gradle @@ -22,7 +22,7 @@ android { minSdkVersion 14 targetSdkVersion 28 versionCode 190 - versionName "2.11.8" + versionName "2.12.0" } // Had to add this crap for Travis to build, it wanted to sign the app diff --git a/core/src/com/unciv/ui/worldscreen/WorldScreen.kt b/core/src/com/unciv/ui/worldscreen/WorldScreen.kt index a486d0bcda..41ba916f56 100644 --- a/core/src/com/unciv/ui/worldscreen/WorldScreen.kt +++ b/core/src/com/unciv/ui/worldscreen/WorldScreen.kt @@ -76,7 +76,8 @@ class WorldScreen : CameraStageBaseScreen() { displayTutorials("NewGame") displayTutorials("TileLayout") - update() + + createNextTurnButton() // needs civ table to be positioned val tileToCenterOn: Vector2 = when { @@ -85,7 +86,6 @@ class WorldScreen : CameraStageBaseScreen() { else -> Vector2.Zero } tileMapHolder.setCenterPosition(tileToCenterOn) - createNextTurnButton() // needs civ table to be positioned } // This is private so that we will set the shouldUpdate to true instead. @@ -261,7 +261,7 @@ class WorldScreen : CameraStageBaseScreen() { } } - var shouldUpdate=false + var shouldUpdate=true override fun render(delta: Float) { if(shouldUpdate){ // This is so that updates happen in the MAIN THREAD, where there is a GL Context, if(currentPlayerCiv!=gameInfo.getCurrentPlayerCivilization()){ @@ -300,5 +300,4 @@ class WorldScreen : CameraStageBaseScreen() { super.render(delta) } -} - +} \ No newline at end of file