Skip to content

armgit / godot

Public Imported from GitHub
0

Godot Engine – Multi-platform 2D and 3D game engine

[macOS] Fix initial window flags.

Pāvels Nadtočajevs3f03764fffa0
diff --git a/platform/macos/display_server_macos.mm b/platform/macos/display_server_macos.mm
index 003c7cc45b6..be12fa5d7f2 100644
--- a/platform/macos/display_server_macos.mm
+++ b/platform/macos/display_server_macos.mm
@@ -1689,7 +1689,7 @@ DisplayServerEnums::WindowID DisplayServerMacOS::create_sub_window(DisplayServer
DisplayServerEnums::WindowID id = _create_window(p_mode, p_vsync_mode, p_rect);
- uint32_t set_flags = p_flags & ~(DisplayServerEnums::WINDOW_FLAG_MAX - 1); // Clear the flags that are not supported by the window.
+ uint32_t set_flags = p_flags & ((1 << DisplayServerEnums::WINDOW_FLAG_MAX) - 1); // Clear the flags that are not supported by the window.
while (set_flags != 0) {
// Find the index of the next set bit.
uint32_t index = (uint32_t)__builtin_ctzll(set_flags);