diff options
-rw-r--r-- | SConstruct | 14 | ||||
-rw-r--r-- | doc/classes/Button.xml | 2 | ||||
-rw-r--r-- | drivers/vulkan/vulkan_context.cpp | 6 | ||||
-rw-r--r-- | platform/iphone/detect.py | 1 | ||||
-rw-r--r-- | scene/gui/popup_menu.cpp | 6 | ||||
-rw-r--r-- | scene/resources/default_theme/default_theme.cpp | 2 |
6 files changed, 21 insertions, 10 deletions
diff --git a/SConstruct b/SConstruct index b8063589c6..127fefeb27 100644 --- a/SConstruct +++ b/SConstruct @@ -179,9 +179,10 @@ opts.Add(BoolVariable("use_volk", "Use the volk library to load the Vulkan loade # Advanced options opts.Add(BoolVariable("dev", "If yes, alias for verbose=yes warnings=extra werror=yes", False)) -opts.Add(BoolVariable("progress", "Show a progress indicator during compilation", True)) opts.Add(BoolVariable("tests", "Build the unit tests", False)) +opts.Add(BoolVariable("fast_unsafe", "Enable unsafe options for faster rebuilds", False)) opts.Add(BoolVariable("verbose", "Enable verbose output for the compilation", False)) +opts.Add(BoolVariable("progress", "Show a progress indicator during compilation", True)) opts.Add(EnumVariable("warnings", "Level of compilation warnings", "all", ("extra", "all", "moderate", "no"))) opts.Add(BoolVariable("werror", "Treat compiler warnings as errors", False)) opts.Add("extra_suffix", "Custom extra suffix added to the base filename of all generated binary files", "") @@ -360,6 +361,17 @@ if env_base["target"] == "debug": # working on the engine itself. env_base.Append(CPPDEFINES=["DEV_ENABLED"]) +# SCons speed optimization controlled by the `fast_unsafe` option, which provide +# more than 10 s speed up for incremental rebuilds. +# Unsafe as they reduce the certainty of rebuilding all changed files, so it's +# enabled by default for `debug` builds, and can be overridden from command line. +# Ref: https://github.com/SCons/scons/wiki/GoFastButton +if methods.get_cmdline_bool("fast_unsafe", env_base["target"] == "debug"): + # Renamed to `content-timestamp` in SCons >= 4.2, keeping MD5 for compat. + env_base.Decider("MD5-timestamp") + env_base.SetOption("implicit_cache", 1) + env_base.SetOption("max_drift", 60) + if env_base["use_precise_math_checks"]: env_base.Append(CPPDEFINES=["PRECISE_MATH_CHECKS"]) diff --git a/doc/classes/Button.xml b/doc/classes/Button.xml index ef4eba62b2..af42f72c66 100644 --- a/doc/classes/Button.xml +++ b/doc/classes/Button.xml @@ -115,7 +115,7 @@ <theme_item name="font_pressed_color" data_type="color" type="Color" default="Color(1, 1, 1, 1)"> Text [Color] used when the [Button] is being pressed. </theme_item> - <theme_item name="icon_disabled_color" data_type="color" type="Color" default="Color(1, 1, 1, 1)"> + <theme_item name="icon_disabled_color" data_type="color" type="Color" default="Color(1, 1, 1, 0.4)"> Icon modulate [Color] used when the [Button] is disabled. </theme_item> <theme_item name="icon_focus_color" data_type="color" type="Color" default="Color(1, 1, 1, 1)"> diff --git a/drivers/vulkan/vulkan_context.cpp b/drivers/vulkan/vulkan_context.cpp index 44455b927b..689d76ba26 100644 --- a/drivers/vulkan/vulkan_context.cpp +++ b/drivers/vulkan/vulkan_context.cpp @@ -273,9 +273,9 @@ Error VulkanContext::_obtain_vulkan_version() { uint32_t api_version; VkResult res = func(&api_version); if (res == VK_SUCCESS) { - vulkan_major = VK_VERSION_MAJOR(api_version); - vulkan_minor = VK_VERSION_MINOR(api_version); - vulkan_patch = VK_VERSION_PATCH(api_version); + vulkan_major = VK_API_VERSION_MAJOR(api_version); + vulkan_minor = VK_API_VERSION_MINOR(api_version); + vulkan_patch = VK_API_VERSION_PATCH(api_version); } else { // according to the documentation this shouldn't fail with anything except a memory allocation error // in which case we're in deep trouble anyway diff --git a/platform/iphone/detect.py b/platform/iphone/detect.py index 4e4b0d81c3..f442235e7c 100644 --- a/platform/iphone/detect.py +++ b/platform/iphone/detect.py @@ -120,7 +120,6 @@ def configure(env): ) ) env.Append(CPPDEFINES=["NEED_LONG_INT"]) - env.Append(CPPDEFINES=["LIBYUV_DISABLE_NEON"]) # Disable exceptions on non-tools (template) builds if not env["tools"]: diff --git a/scene/gui/popup_menu.cpp b/scene/gui/popup_menu.cpp index b76bb230be..61a5fb999c 100644 --- a/scene/gui/popup_menu.cpp +++ b/scene/gui/popup_menu.cpp @@ -825,7 +825,7 @@ void PopupMenu::_notification(int p_what) { #define ITEM_SETUP_WITH_ACCEL(p_label, p_id, p_accel) \ item.text = p_label; \ item.xl_text = atr(p_label); \ - item.id = p_id == -1 ? items.size() - 1 : p_id; \ + item.id = p_id == -1 ? items.size() : p_id; \ item.accel = p_accel; void PopupMenu::add_item(const String &p_label, int p_id, Key p_accel) { @@ -907,7 +907,7 @@ void PopupMenu::add_multistate_item(const String &p_label, int p_max_states, int _ref_shortcut(p_shortcut); \ item.text = p_shortcut->get_name(); \ item.xl_text = atr(item.text); \ - item.id = p_id == -1 ? items.size() - 1 : p_id; \ + item.id = p_id == -1 ? items.size() : p_id; \ item.shortcut = p_shortcut; \ item.shortcut_is_global = p_global; @@ -976,7 +976,7 @@ void PopupMenu::add_submenu_item(const String &p_label, const String &p_submenu, Item item; item.text = p_label; item.xl_text = atr(p_label); - item.id = p_id == -1 ? items.size() - 1 : p_id; + item.id = p_id == -1 ? items.size() : p_id; item.submenu = p_submenu; items.push_back(item); _shape_item(items.size() - 1); diff --git a/scene/resources/default_theme/default_theme.cpp b/scene/resources/default_theme/default_theme.cpp index 670b141080..c92a46a98c 100644 --- a/scene/resources/default_theme/default_theme.cpp +++ b/scene/resources/default_theme/default_theme.cpp @@ -175,7 +175,7 @@ void fill_default_theme(Ref<Theme> &theme, const Ref<Font> &default_font, Ref<Te theme->set_color("icon_hover_color", "Button", Color(1, 1, 1, 1)); theme->set_color("icon_hover_pressed_color", "Button", Color(1, 1, 1, 1)); theme->set_color("icon_focus_color", "Button", Color(1, 1, 1, 1)); - theme->set_color("icon_disabled_color", "Button", Color(1, 1, 1, 1)); + theme->set_color("icon_disabled_color", "Button", Color(1, 1, 1, 0.4)); theme->set_constant("hseparation", "Button", 2 * scale); |