Save uncaught exception to file (#7247)

* Refactor: Rename GameSaver to UncivFiles

* Save last uncaught exception to file

Co-authored-by: Yair Morgenstern <yairm210@hotmail.com>
This commit is contained in:
Timo T
2022-06-25 21:30:27 +02:00
committed by GitHub
parent 98af4207ec
commit bc9a42e452
22 changed files with 115 additions and 98 deletions

View File

@ -9,7 +9,7 @@ import com.badlogic.gdx.graphics.glutils.HdpiMode
import com.sun.jna.Native
import com.unciv.UncivGame
import com.unciv.UncivGameParameters
import com.unciv.logic.GameSaver
import com.unciv.logic.UncivFiles
import com.unciv.ui.utils.Fonts
import com.unciv.utils.Log
import com.unciv.utils.debug
@ -42,7 +42,7 @@ internal object DesktopLauncher {
// Note that means config.setAudioConfig() would be ignored too, those would need to go into the HardenedGdxAudio constructor.
config.disableAudio(true)
val settings = GameSaver.getSettingsForPlatformLaunchers()
val settings = UncivFiles.getSettingsForPlatformLaunchers()
if (!settings.isFreshlyCreated) {
config.setWindowedMode(settings.windowState.width.coerceAtLeast(120), settings.windowState.height.coerceAtLeast(80))
}