mirror of
https://github.com/yairm210/Unciv.git
synced 2025-07-08 14:57: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()
|
||||
}
|
||||
} else {
|
||||
Gdx.app.postRunnable {
|
||||
val popup = Popup(this)
|
||||
popup.addGoodSizedLabel("Loading...")
|
||||
popup.open()
|
||||
}
|
||||
val map = MapSaver.loadMap(chosenMap!!)
|
||||
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))
|
||||
dispose()
|
||||
}
|
||||
|
Reference in New Issue
Block a user