Skip to content

Commit

Permalink
Hopefully resolved ANRs from WorldScreen updates
Browse files Browse the repository at this point in the history
  • Loading branch information
yairm210 committed Oct 13, 2022
1 parent 9520589 commit f3b4db9
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 6 deletions.
5 changes: 4 additions & 1 deletion core/src/com/unciv/ui/worldscreen/WorldScreen.kt
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,7 @@ import com.badlogic.gdx.scenes.scene2d.actions.Actions
import com.badlogic.gdx.scenes.scene2d.actions.RepeatAction
import com.badlogic.gdx.scenes.scene2d.ui.Table
import com.badlogic.gdx.scenes.scene2d.ui.TextButton
import com.badlogic.gdx.scenes.scene2d.ui.TextField
import com.badlogic.gdx.utils.Align
import com.unciv.Constants
import com.unciv.MainMenuScreen
Expand Down Expand Up @@ -75,7 +76,6 @@ import com.unciv.utils.concurrency.withGLContext
import com.unciv.utils.debug
import kotlinx.coroutines.Job
import kotlinx.coroutines.coroutineScope
import com.badlogic.gdx.scenes.scene2d.ui.TextField

/**
* Do not create this screen without seriously thinking about the implications: this is the single most memory-intensive class in the application.
Expand Down Expand Up @@ -785,8 +785,11 @@ class WorldScreen(
if (shouldUpdate) {
shouldUpdate = false

// Since updating the worldscreen can take a long time, *especially* the first time, we disable input processing to avoid ANRs
Gdx.input.inputProcessor = null
update()
showTutorialsOnNextTurn()
Gdx.input.inputProcessor = stage
}
// topBar.selectedCivLabel.setText(Gdx.graphics.framesPerSecond) // for framerate testing

Expand Down
5 changes: 0 additions & 5 deletions docs/Modders/uniques.md
Original file line number Diff line number Diff line change
Expand Up @@ -1724,11 +1724,6 @@ Simple unique parameters are explained by mouseover. Complex parameters are expl

Applicable to: Conditional

??? example "<upon discovering [tech]>"
Example: "<upon discovering [Agriculture]>"

Applicable to: Conditional

??? example "<after adopting [policy]>"
Example: "<after adopting [Oligarchy]>"

Expand Down

0 comments on commit f3b4db9

Please sign in to comment.