Skip to content

Commit

Permalink
add getGameVersion method for geode
Browse files Browse the repository at this point in the history
  • Loading branch information
qimiko committed Jan 13, 2024
1 parent 588e0b8 commit 59a006f
Showing 1 changed file with 15 additions and 0 deletions.
15 changes: 15 additions & 0 deletions app/src/main/java/com/geode/launcher/utils/GeodeUtils.kt
Original file line number Diff line number Diff line change
Expand Up @@ -228,6 +228,21 @@ object GeodeUtils {
return LaunchUtils.getBaseDirectory(activity).path
}

private val gameVersionMap = mapOf(
37L to "2.200"
)

@JvmStatic
fun getGameVersion(): String {
// these versions should be aligned to windows releases, not what android says
activity.get()?.run {
val versionCode = LaunchUtils.getGeometryDashVersionCode(packageManager)
return gameVersionMap[versionCode] ?: LaunchUtils.getGeometryDashVersionString(packageManager)
}

return ""
}

// copied from https://stackoverflow.com/questions/17546101/get-real-path-for-uri-android
// i am actually very lazy to move this to a separate class

Expand Down

0 comments on commit 59a006f

Please sign in to comment.