Skip to content

Commit

Permalink
Fix issue causing Godot Android apps / games to freeze on close
Browse files Browse the repository at this point in the history
The issue occurred because during the 'close' event, the logic was trying to terminate the native engine on the UI thread instead of doing on the render thread.
  • Loading branch information
m4gr3d committed Nov 28, 2023
1 parent eda44bf commit 1e4af52
Showing 1 changed file with 5 additions and 2 deletions.
7 changes: 5 additions & 2 deletions platform/android/java/lib/src/org/godotengine/godot/Godot.kt
Original file line number Diff line number Diff line change
Expand Up @@ -536,8 +536,11 @@ class Godot(private val context: Context) : SensorEventListener {
for (plugin in pluginRegistry.allPlugins) {
plugin.onMainDestroy()
}
GodotLib.ondestroy()
forceQuit()

runOnRenderThread {
GodotLib.ondestroy()
forceQuit()
}
}

/**
Expand Down

0 comments on commit 1e4af52

Please sign in to comment.