From dfb2bc5f7e87a469b50ae9d6f52699063c8a191d Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Pa=CC=84vels=20Nadtoc=CC=8Cajevs?= <7645683+bruvzg@users.noreply.github.com> Date: Wed, 14 May 2025 09:37:06 +0300 Subject: [PATCH] Fix macOS build with dev_build=yes and target=template_debug --- platform/macos/godot_application.mm | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/platform/macos/godot_application.mm b/platform/macos/godot_application.mm index e9663461d4d..fb8a3cf217e 100644 --- a/platform/macos/godot_application.mm +++ b/platform/macos/godot_application.mm @@ -63,11 +63,14 @@ GodotApplication *GodotApp = nil; NSString *nsbundleid_env = [NSString stringWithUTF8String:(bundled_id != nullptr) ? bundled_id : ""]; NSString *nsbundleid = [[NSBundle mainBundle] bundleIdentifier]; if (nsappname == nil || isatty(STDOUT_FILENO) || isatty(STDIN_FILENO) || isatty(STDERR_FILENO) || ![nsbundleid isEqualToString:nsbundleid_env]) { -#if DEV_ENABLED - if (!OS_MacOS::is_debugger_attached()) +#ifdef TOOLS_ENABLED + if (!OS_MacOS::is_debugger_attached()) { +#else + { #endif // If the executable is started from terminal or is not bundled, macOS WindowServer won't register and activate app window correctly (menu and title bar are grayed out and input ignored). [self performSelector:@selector(forceUnbundledWindowActivationHackStep1) withObject:nil afterDelay:0.02]; + } } }