Skip to content

Commit

Permalink
Merge pull request godotengine#85457 from m4gr3d/fix_android_editor_r…
Browse files Browse the repository at this point in the history
…estart_loop

Fix an issue causing the running project window to loop-restart when closed
  • Loading branch information
akien-mga authored Nov 28, 2023
2 parents a008a85 + 7cd6041 commit f82bf35
Showing 1 changed file with 3 additions and 10 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -221,16 +221,9 @@ open class GodotEditor : GodotActivity() {
val runningProcesses = activityManager.runningAppProcesses
for (runningProcess in runningProcesses) {
if (runningProcess.processName.endsWith(processNameSuffix)) {
if (targetClass == null) {
// Killing process directly
Log.v(TAG, "Killing Godot process ${runningProcess.processName}")
Process.killProcess(runningProcess.pid)
} else {
// Activity is running; sending a request for self termination.
Log.v(TAG, "Sending force quit request to $targetClass running on process ${runningProcess.processName}")
val forceQuitIntent = Intent(this, targetClass).putExtra(EXTRA_FORCE_QUIT, true)
startActivity(forceQuitIntent)
}
// Killing process directly
Log.v(TAG, "Killing Godot process ${runningProcess.processName}")
Process.killProcess(runningProcess.pid)
return true
}
}
Expand Down

0 comments on commit f82bf35

Please sign in to comment.