mirror of
https://github.com/yairm210/Unciv.git
synced 2025-07-11 00:08:58 +07:00
Solved ANRs when loading large maps in map editor
This commit is contained in:
@ -45,8 +45,14 @@ class LoadMapScreen(previousMap: TileMap?) : PickerScreen(){
|
|||||||
dispose()
|
dispose()
|
||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
|
Gdx.app.postRunnable {
|
||||||
|
val popup = Popup(this)
|
||||||
|
popup.addGoodSizedLabel("Loading...")
|
||||||
|
popup.open()
|
||||||
|
}
|
||||||
val map = MapSaver.loadMap(chosenMap!!)
|
val map = MapSaver.loadMap(chosenMap!!)
|
||||||
Gdx.app.postRunnable {
|
Gdx.app.postRunnable {
|
||||||
|
Gdx.input.inputProcessor = null // This is to stop ANRs happening here, until the map editor screen sets up.
|
||||||
UncivGame.Current.setScreen(MapEditorScreen(map))
|
UncivGame.Current.setScreen(MapEditorScreen(map))
|
||||||
dispose()
|
dispose()
|
||||||
}
|
}
|
||||||
|
Reference in New Issue
Block a user