mirror of
https://github.com/geode-sdk/android-launcher.git
synced 2026-10-22 16:42:38 +00:00
store the current game version
This commit is contained in:
1 file changed
+8
@@ -73,6 +73,7 @@ class GeometryDashActivity : AppCompatActivity(), Cocos2dxHelper.Cocos2dxHelperL
|
|||||||
}
|
}
|
||||||
|
|
||||||
try {
|
try {
|
||||||
|
createVersionFile()
|
||||||
tryLoadGame()
|
tryLoadGame()
|
||||||
} catch (e: UnsatisfiedLinkError) {
|
} catch (e: UnsatisfiedLinkError) {
|
||||||
Log.e("GeodeLauncher", "Library linkage failure", e)
|
Log.e("GeodeLauncher", "Library linkage failure", e)
|
||||||
@@ -104,6 +105,13 @@ class GeometryDashActivity : AppCompatActivity(), Cocos2dxHelper.Cocos2dxHelperL
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
private fun createVersionFile() {
|
||||||
|
val versionPath = File(filesDir, "game_version.txt")
|
||||||
|
val gameVersion = GamePackageUtils.getGameVersionCode(packageManager)
|
||||||
|
|
||||||
|
versionPath.writeText("$gameVersion")
|
||||||
|
}
|
||||||
|
|
||||||
private fun returnToMain(
|
private fun returnToMain(
|
||||||
error: LaunchUtils.LauncherError? = null,
|
error: LaunchUtils.LauncherError? = null,
|
||||||
returnMessage: String? = null,
|
returnMessage: String? = null,
|
||||||
|
|||||||
Reference in new issue
Block a user