mirror of
https://github.com/yairm210/Unciv.git
synced 2025-07-08 23:08:35 +07:00
Hopefully made some memory errors clearer to the user
This commit is contained in:
@ -78,7 +78,12 @@ class WorldScreen(val viewingCiv:CivilizationInfo) : CameraStageBaseScreen() {
|
|||||||
|
|
||||||
minimapWrapper.x = stage.width - minimapWrapper.width
|
minimapWrapper.x = stage.width - minimapWrapper.width
|
||||||
|
|
||||||
mapHolder.addTiles()
|
try { // Most memory errors occur here, so this is a sort of catch-all
|
||||||
|
mapHolder.addTiles()
|
||||||
|
} catch (outOfMemoryError:OutOfMemoryError){
|
||||||
|
mapHolder.clear() // hopefully enough memory will be freed to be able to display the toast popup
|
||||||
|
ToastPopup("Not enough memory on phone to load game!", this)
|
||||||
|
}
|
||||||
|
|
||||||
techButtonHolder.touchable = Touchable.enabled
|
techButtonHolder.touchable = Touchable.enabled
|
||||||
techButtonHolder.onClick(UncivSound.Paper) {
|
techButtonHolder.onClick(UncivSound.Paper) {
|
||||||
|
Reference in New Issue
Block a user