diff options
author | Rémi Verschelde <rverschelde@gmail.com> | 2024-03-06 13:16:52 +0100 |
---|---|---|
committer | Rémi Verschelde <rverschelde@gmail.com> | 2024-03-06 13:16:52 +0100 |
commit | 13954fc33e603aac4f13973b77aa644f7dcc95f0 (patch) | |
tree | 4afc6546c675816713c902f0f06a308d97fa8ab1 /platform/macos/godot_application_delegate.mm | |
parent | b85337b7eaf4ba0217046c126e0f8ea4f7e09ea5 (diff) | |
parent | c65a6679248476f554a0876ac32618b580beb010 (diff) | |
download | redot-engine-13954fc33e603aac4f13973b77aa644f7dcc95f0.tar.gz |
Merge pull request #87452 from bruvzg/native_menu
Move `global_menu_*` methods to a separate `NativeMenu` class.
Diffstat (limited to 'platform/macos/godot_application_delegate.mm')
-rw-r--r-- | platform/macos/godot_application_delegate.mm | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/platform/macos/godot_application_delegate.mm b/platform/macos/godot_application_delegate.mm index b3759e66f5..02466bab97 100644 --- a/platform/macos/godot_application_delegate.mm +++ b/platform/macos/godot_application_delegate.mm @@ -31,6 +31,7 @@ #include "godot_application_delegate.h" #include "display_server_macos.h" +#include "native_menu_macos.h" #include "os_macos.h" @implementation GodotApplicationDelegate @@ -211,9 +212,9 @@ } - (NSMenu *)applicationDockMenu:(NSApplication *)sender { - DisplayServerMacOS *ds = (DisplayServerMacOS *)DisplayServer::get_singleton(); - if (ds) { - return ds->get_dock_menu(); + if (NativeMenu::get_singleton()) { + NativeMenuMacOS *nmenu = (NativeMenuMacOS *)NativeMenu::get_singleton(); + return nmenu->_get_dock_menu(); } else { return nullptr; } |