Application: extract the auto exit behavior into a separate method from __removeWindow()

This will allow OpenFL to override the behavior based on the NativeApplication class.
This commit is contained in:
Josh Tynjala
2022-10-10 13:27:33 -07:00
parent a9d964cb89
commit 6e8fb70d04

View File

@@ -549,12 +549,17 @@ class Application extends Module
__windowByID.remove(window.id);
window.close();
if (__windows.length == 0)
{
#if !lime_doc_gen
System.exit(0);
#end
}
__checkForAllWindowsClosed();
}
}
@:noCompletion private function __checkForAllWindowsClosed():Void
{
if (__windows.length == 0)
{
#if !lime_doc_gen
System.exit(0);
#end
}
}