mirror of
https://github.com/yairm210/Unciv.git
synced 2025-07-13 09:18:43 +07:00
Game now saves save files in external storage on Android when possible.
May the lord have mercy on our souls.
This commit is contained in:
@ -7,6 +7,7 @@ import androidx.work.WorkManager
|
||||
import com.badlogic.gdx.backends.android.AndroidApplication
|
||||
import com.badlogic.gdx.backends.android.AndroidApplicationConfiguration
|
||||
import com.unciv.UncivGame
|
||||
import com.unciv.logic.GameSaver
|
||||
import java.io.File
|
||||
|
||||
class AndroidLauncher : AndroidApplication() {
|
||||
@ -17,6 +18,7 @@ class AndroidLauncher : AndroidApplication() {
|
||||
// Only allow mods on KK+, to avoid READ_EXTERNAL_STORAGE permission earlier versions need
|
||||
if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.KITKAT) {
|
||||
copyMods()
|
||||
GameSaver.externalFilesDirForAndroid = getExternalFilesDir(null)!!.path
|
||||
}
|
||||
|
||||
val config = AndroidApplicationConfiguration().apply { useImmersiveMode = true }
|
||||
|
Reference in New Issue
Block a user