You've already forked godot
mirror of
https://github.com/godotengine/godot.git
synced 2025-11-04 12:00:25 +00:00
Merge pull request #104615 from bruvzg/cleanup_fix
[macOS] Fix cleanup with some command line tools.
This commit is contained in:
@@ -240,7 +240,7 @@
|
|||||||
|
|
||||||
- (NSApplicationTerminateReply)applicationShouldTerminate:(NSApplication *)sender {
|
- (NSApplicationTerminateReply)applicationShouldTerminate:(NSApplication *)sender {
|
||||||
DisplayServerMacOS *ds = (DisplayServerMacOS *)DisplayServer::get_singleton();
|
DisplayServerMacOS *ds = (DisplayServerMacOS *)DisplayServer::get_singleton();
|
||||||
if (ds) {
|
if (ds && ds->has_window(DisplayServerMacOS::MAIN_WINDOW_ID)) {
|
||||||
ds->send_window_event(ds->get_window(DisplayServerMacOS::MAIN_WINDOW_ID), DisplayServerMacOS::WINDOW_EVENT_CLOSE_REQUEST);
|
ds->send_window_event(ds->get_window(DisplayServerMacOS::MAIN_WINDOW_ID), DisplayServerMacOS::WINDOW_EVENT_CLOSE_REQUEST);
|
||||||
}
|
}
|
||||||
OS_MacOS *os = (OS_MacOS *)OS::get_singleton();
|
OS_MacOS *os = (OS_MacOS *)OS::get_singleton();
|
||||||
|
|||||||
@@ -882,11 +882,11 @@ void OS_MacOS::terminate() {
|
|||||||
void OS_MacOS::cleanup() {
|
void OS_MacOS::cleanup() {
|
||||||
if (main_loop) {
|
if (main_loop) {
|
||||||
main_loop->finalize();
|
main_loop->finalize();
|
||||||
|
}
|
||||||
@autoreleasepool {
|
@autoreleasepool {
|
||||||
Main::cleanup();
|
Main::cleanup();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
|
||||||
|
|
||||||
OS_MacOS::OS_MacOS(const char *p_execpath, int p_argc, char **p_argv) {
|
OS_MacOS::OS_MacOS(const char *p_execpath, int p_argc, char **p_argv) {
|
||||||
execpath = p_execpath;
|
execpath = p_execpath;
|
||||||
|
|||||||
Reference in New Issue
Block a user