Fix OutOfMemory error when loading game state after already having a game loaded (#7145)

* Fix OutOfMemory error when loading game state after already having a game loaded

* Fix screen resize not being handled correctly

* Add withContext shortcut functions

* Add more logging

* Fix multiplayer games sometimes being loaded twice

* Make the loading screen nicer

* Make the loading screen hide previous popups for making the screenshot

* Don't do custom rendering & dispose the texture

Sometimes it makes sense to understand the library you're using...

* Fix missing GL context

* Refactor: increase readability of loadGame function
This commit is contained in:
Timo T
2022-06-14 20:09:09 +02:00
committed by GitHub
parent b6a98e5540
commit a5f9623dbe
15 changed files with 304 additions and 153 deletions

View File

@ -48,7 +48,7 @@ internal object ConsoleLauncher {
val mapParameters = getMapParameters()
val gameSetupInfo = GameSetupInfo(gameParameters, mapParameters)
val newGame = GameStarter.startNewGame(gameSetupInfo)
UncivGame.Current.gameInfo = newGame
UncivGame.Current.startSimulation(newGame)
val simulation = Simulation(newGame,10,4)