Skip to content

Commit

Permalink
Android: Fixes crash with vfsInitWithAndroidContextOnce (#1798)
Browse files Browse the repository at this point in the history
  • Loading branch information
soywiz committed Jul 12, 2023
1 parent 7ed6da6 commit 0289a03
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion korgw/src/androidMain/kotlin/korlibs/render/KorgwActivity.kt
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,6 @@ abstract class KorgwActivity(
private var defaultUiVisibility = -1

init {
vfsInitWithAndroidContextOnce(this)
activityWithResult.activity = this
gameWindow.onContinuousRenderModeUpdated = {
mGLView?.continuousRenderMode = it
Expand All @@ -52,6 +51,8 @@ abstract class KorgwActivity(
public override fun onCreate(savedInstanceState: Bundle?) {
super.onCreate(savedInstanceState)

vfsInitWithAndroidContextOnce(this)

intent.extras?.get("sleepBeforeStart")?.toString()?.toLongOrNull()?.let {
Thread.sleep(it)
println("Slept $it milliseconds")
Expand Down

0 comments on commit 0289a03

Please sign in to comment.