File tree Expand file tree Collapse file tree 2 files changed +5
-3
lines changed
Expand file tree Collapse file tree 2 files changed +5
-3
lines changed Original file line number Diff line number Diff line change @@ -132,6 +132,8 @@ int main(int argc, char **argv) {
132132
133133 os->run ();
134134
135+ // Note: `os->run()` will never return if `OS_MacOS_NSApp` is used. Use `OS_MacOS_NSApp::cleanup()` for cleanup.
136+
135137 int exit_code = os->get_exit_code ();
136138
137139 memdelete (os);
Original file line number Diff line number Diff line change 10761076// MARK: - OS_MacOS_NSApp
10771077
10781078void OS_MacOS_NSApp::run () {
1079- [NSApp run ];
1079+ [NSApp run ]; // Note: this call will never return. Use `OS_MacOS_NSApp::cleanup()` for cleanup.
10801080}
10811081
10821082static bool sig_received = false ;
@@ -1154,8 +1154,7 @@ static void handle_interrupt(int sig) {
11541154}
11551155
11561156void OS_MacOS_NSApp::terminate () {
1157- godot_cleanup_profiler ();
1158-
1157+ // Note: This method only sends app termination request. Use `OS_MacOS_NSApp::cleanup()` for cleanup.
11591158 if (pre_wait_observer) {
11601159 CFRunLoopRemoveObserver (CFRunLoopGetCurrent (), pre_wait_observer, kCFRunLoopCommonModes );
11611160 CFRelease (pre_wait_observer);
@@ -1175,6 +1174,7 @@ static void handle_interrupt(int sig) {
11751174 Main::cleanup ();
11761175 }
11771176 }
1177+ godot_cleanup_profiler ();
11781178}
11791179
11801180OS_MacOS_NSApp::OS_MacOS_NSApp (const char *p_execpath, int p_argc, char **p_argv) :
You can’t perform that action at this time.
0 commit comments