From 7ff5d3bad2c985eec2db1e8f9d6033b0d238100e Mon Sep 17 00:00:00 2001 From: decryptedchaos Date: Mon, 5 Jan 2026 19:28:18 -0600 Subject: [PATCH 01/10] Fix Automatic splash_bg --- editor/settings/editor_settings.cpp | 54 +++++++++++- editor/settings/editor_settings.h | 2 + main/main.cpp | 110 ++++-------------------- main/main.h | 2 + servers/rendering/renderer_viewport.cpp | 3 +- 5 files changed, 78 insertions(+), 93 deletions(-) diff --git a/editor/settings/editor_settings.cpp b/editor/settings/editor_settings.cpp index 3b7460d689a..4bebc6f54a9 100644 --- a/editor/settings/editor_settings.cpp +++ b/editor/settings/editor_settings.cpp @@ -43,6 +43,7 @@ #include "core/io/resource_loader.h" #include "core/io/resource_saver.h" #include "core/object/class_db.h" +#include "core/variant/variant_parser.h" #include "core/os/keyboard.h" #include "core/os/os.h" #include "core/string/translation_server.h" @@ -582,7 +583,7 @@ void EditorSettings::_load_defaults(Ref p_extra_config) { EDITOR_SETTING_BASIC(Variant::STRING, PROPERTY_HINT_ENUM, "interface/theme/preset", "Default", "Default,Breeze Dark,Godot,Godot 2,Gray,Light,Solarized (Dark),Solarized (Light),Black (OLED),Indigo,Custom") EDITOR_SETTING_BASIC(Variant::STRING, PROPERTY_HINT_ENUM, "interface/theme/spacing_preset", "Default", "Compact,Default,Spacious,Custom") EDITOR_SETTING(Variant::INT, PROPERTY_HINT_ENUM, "interface/theme/icon_and_font_color", 0, "Auto,Dark,Light") - EDITOR_SETTING_BASIC(Variant::COLOR, PROPERTY_HINT_NONE, "interface/theme/base_color", Color(0.2, 0.23, 0.31), "") + EDITOR_SETTING_BASIC(Variant::COLOR, PROPERTY_HINT_NONE, "interface/theme/base_color", get_default_base_color(), "") EDITOR_SETTING_BASIC(Variant::COLOR, PROPERTY_HINT_NONE, "interface/theme/accent_color", Color(0.41, 0.61, 0.91), "") EDITOR_SETTING_BASIC(Variant::BOOL, PROPERTY_HINT_NONE, "interface/theme/use_system_accent_color", false, "") EDITOR_SETTING_BASIC(Variant::FLOAT, PROPERTY_HINT_RANGE, "interface/theme/contrast", 0.3, "-1,1,0.01") @@ -1239,6 +1240,57 @@ String EditorSettings::get_existing_settings_path() { return config_dir.path_join(filename); } +static Error _parse_direct_resource_dummy(void *p_data, VariantParser::Stream *p_stream, Ref &r_res, int &line, String &r_err_str) { + return OK; +} + +Variant EditorSettings::get_setting_directly(const String &p_setting, const Variant &p_default) { + if (!EditorPaths::get_singleton() || !EditorPaths::get_singleton()->are_paths_valid()) { + return p_default; + } + + String config_file_path = get_existing_settings_path(); + if (config_file_path.is_empty() || !FileAccess::exists(config_file_path)) { + return p_default; + } + + Ref f = FileAccess::open(config_file_path, FileAccess::READ); + if (f.is_null()) { + return p_default; + } + + VariantParser::StreamFile stream; + stream.f = f; + String assign; + Variant value; + VariantParser::Tag next_tag; + int lines = 0; + String error_text; + VariantParser::ResourceParser rp_new; + rp_new.ext_func = _parse_direct_resource_dummy; + rp_new.sub_func = _parse_direct_resource_dummy; + + while (true) { + assign = Variant(); + next_tag.fields.clear(); + next_tag.name = String(); + Error err = VariantParser::parse_tag_assign_eof(&stream, lines, error_text, next_tag, assign, value, &rp_new, true, true); + if (err == ERR_FILE_EOF) { + break; + } + if (err == OK && !assign.is_empty() && assign == p_setting) { + return value; + } + } + + return p_default; +} + +Color EditorSettings::get_default_base_color() { + return Color(0.06, 0.09, 0.14); +} + + String EditorSettings::get_newest_settings_path() { const String config_file_name = vformat("editor_settings-%d.%d.tres", REDOT_VERSION_MAJOR, REDOT_VERSION_MINOR); return EditorPaths::get_singleton()->get_config_dir().path_join(config_file_name); diff --git a/editor/settings/editor_settings.h b/editor/settings/editor_settings.h index ce6c4bdbabf..5c060db0371 100644 --- a/editor/settings/editor_settings.h +++ b/editor/settings/editor_settings.h @@ -138,6 +138,8 @@ class EditorSettings : public Resource { static EditorSettings *get_singleton(); static String get_existing_settings_path(); static String get_newest_settings_path(); + static Variant get_setting_directly(const String &p_setting, const Variant &p_default = Variant()); + static Color get_default_base_color(); static void create(); void setup_language(); diff --git a/main/main.cpp b/main/main.cpp index d21510bf4f3..7ccfc831704 100644 --- a/main/main.cpp +++ b/main/main.cpp @@ -135,10 +135,7 @@ #include "modules/modules_enabled.gen.h" // For mono. -// Fallback definition for missing editor splash color -#if defined(TOOLS_ENABLED) && !defined(NO_EDITOR_SPLASH) -static const Color boot_splash_editor_bg_color = Color(0.06, 0.09, 0.14); -#endif + #if defined(MODULE_MONO_ENABLED) && defined(TOOLS_ENABLED) #include "modules/mono/editor/bindings_generator.h" @@ -1941,6 +1938,7 @@ Error Main::setup(const char *execpath, int argc, char *argv[], bool p_second_ph } else { #ifdef TOOLS_ENABLED editor = false; + project_manager = true; #else const String error_msg = "Error: Couldn't load project data at path \"" + project_path + "\". Is the .pck file missing?\nIf you've renamed the executable, the associated .pck file should also be renamed to match the executable's name (without the extension).\n"; OS::get_singleton()->print("%s", error_msg.utf8().get_data()); @@ -3170,48 +3168,7 @@ Error Main::setup2(bool p_show_boot_logo) { window_position = &position; } - Color boot_bg_color; -#ifdef TOOLS_ENABLED - if (editor) { - // Read base color directly from settings file since EditorSettings isn't available yet - boot_bg_color = Color(0.06, 0.09, 0.14); // Default fallback - if (EditorPaths::get_singleton() && EditorPaths::get_singleton()->are_paths_valid()) { - String config_file_path = EditorSettings::get_existing_settings_path(); - if (FileAccess::exists(config_file_path)) { - Ref f = FileAccess::open(config_file_path, FileAccess::READ); - if (f.is_valid()) { - VariantParser::StreamFile stream; - stream.f = f; - String assign; - Variant value; - VariantParser::Tag next_tag; - int lines = 0; - String error_text; - VariantParser::ResourceParser rp_new; - rp_new.ext_func = _parse_resource_dummy; - rp_new.sub_func = _parse_resource_dummy; - while (true) { - assign = Variant(); - next_tag.fields.clear(); - next_tag.name = String(); - Error err = VariantParser::parse_tag_assign_eof(&stream, lines, error_text, next_tag, assign, value, &rp_new, true); - if (err == ERR_FILE_EOF) { - break; - } - if (err == OK && !assign.is_empty() && assign == "interface/theme/base_color") { - boot_bg_color = value; - break; - } - } - } - } - } - } else { - boot_bg_color = GLOBAL_DEF_BASIC("application/boot_splash/bg_color", boot_splash_bg_color); - } -#else - boot_bg_color = GLOBAL_DEF_BASIC("application/boot_splash/bg_color", boot_splash_bg_color); -#endif + Color boot_bg_color = _get_boot_splash_bg_color(); DisplayServer::set_early_window_clear_color_override(true, boot_bg_color); DisplayServer::Context context; @@ -3526,7 +3483,7 @@ Error Main::setup2(bool p_show_boot_logo) { } } - Color clear = GLOBAL_DEF_BASIC("rendering/environment/defaults/default_clear_color", Color(0.128, 0.128, 0.128)); + Color clear = GLOBAL_DEF_BASIC("rendering/environment/defaults/default_clear_color", _get_boot_splash_bg_color()); RenderingServer::get_singleton()->set_default_clear_color(clear); if (p_show_boot_logo) { @@ -3807,6 +3764,16 @@ Error Main::setup2(bool p_show_boot_logo) { return OK; } +Color Main::_get_boot_splash_bg_color() { +#if defined(TOOLS_ENABLED) + if (editor || project_manager) { + return EditorSettings::get_setting_directly("interface/theme/base_color", EditorSettings::get_default_base_color()); + } +#endif + + return GLOBAL_DEF_BASIC("application/boot_splash/bg_color", boot_splash_bg_color); +} + void Main::setup_boot_logo() { MAIN_PRINT("Main: Load Boot Image"); @@ -3852,48 +3819,7 @@ void Main::setup_boot_logo() { boot_logo->set_pixel(0, 0, Color(0, 0, 0, 0)); } - Color boot_bg_color; -#ifdef TOOLS_ENABLED - if (editor) { - // Read base color directly from settings file since EditorSettings isn't available yet - boot_bg_color = Color(0.06, 0.09, 0.14); // Default fallback - if (EditorPaths::get_singleton() && EditorPaths::get_singleton()->are_paths_valid()) { - String config_file_path = EditorSettings::get_existing_settings_path(); - if (FileAccess::exists(config_file_path)) { - Ref f = FileAccess::open(config_file_path, FileAccess::READ); - if (f.is_valid()) { - VariantParser::StreamFile stream; - stream.f = f; - String assign; - Variant value; - VariantParser::Tag next_tag; - int lines = 0; - String error_text; - VariantParser::ResourceParser rp_new; - rp_new.ext_func = _parse_resource_dummy; - rp_new.sub_func = _parse_resource_dummy; - while (true) { - assign = Variant(); - next_tag.fields.clear(); - next_tag.name = String(); - Error err = VariantParser::parse_tag_assign_eof(&stream, lines, error_text, next_tag, assign, value, &rp_new, true); - if (err == ERR_FILE_EOF) { - break; - } - if (err == OK && !assign.is_empty() && assign == "interface/theme/base_color") { - boot_bg_color = value; - break; - } - } - } - } - } - } else { - boot_bg_color = GLOBAL_DEF_BASIC("application/boot_splash/bg_color", boot_splash_bg_color); - } -#else - boot_bg_color = GLOBAL_DEF_BASIC("application/boot_splash/bg_color", boot_splash_bg_color); -#endif + Color boot_bg_color = _get_boot_splash_bg_color(); if (boot_logo.is_valid()) { RenderingServer::get_singleton()->set_boot_image(boot_logo, boot_bg_color, boot_logo_scale, boot_logo_filter); @@ -3920,8 +3846,10 @@ void Main::setup_boot_logo() { } #endif } - RenderingServer::get_singleton()->set_default_clear_color( - GLOBAL_GET("rendering/environment/defaults/default_clear_color")); + if (!editor && !project_manager) { + RenderingServer::get_singleton()->set_default_clear_color( + GLOBAL_GET("rendering/environment/defaults/default_clear_color")); + } } String Main::get_rendering_driver_name() { diff --git a/main/main.h b/main/main.h index 369f02636a5..8daff87cf9a 100644 --- a/main/main.h +++ b/main/main.h @@ -37,6 +37,7 @@ template class Vector; +struct Color; class Main { enum CLIOptionAvailability { @@ -74,6 +75,7 @@ class Main { static Error setup2(bool p_show_boot_logo = true); // The thread calling setup2() will effectively become the main thread. static String get_rendering_driver_name(); static void setup_boot_logo(); + static Color _get_boot_splash_bg_color(); #ifdef TESTS_ENABLED static Error test_setup(); static void test_cleanup(); diff --git a/servers/rendering/renderer_viewport.cpp b/servers/rendering/renderer_viewport.cpp index 27f955f36dc..a49b6ba56a2 100644 --- a/servers/rendering/renderer_viewport.cpp +++ b/servers/rendering/renderer_viewport.cpp @@ -37,6 +37,7 @@ #include "core/object/worker_thread_pool.h" #include "renderer_canvas_cull.h" #include "renderer_scene_cull.h" +#include "main/main.h" #include "rendering_server_globals.h" #include "storage/texture_storage.h" @@ -746,7 +747,7 @@ void RendererViewport::draw_viewports(bool p_swap_buffers) { #endif // XR_DISABLED if (Engine::get_singleton()->is_editor_hint()) { - RSG::texture_storage->set_default_clear_color(GLOBAL_GET_CACHED(Color, "rendering/environment/defaults/default_clear_color")); + RSG::texture_storage->set_default_clear_color(Main::_get_boot_splash_bg_color()); } if (sorted_active_viewports_dirty) { From a9ebac7b3c8338bef1c9fcd0a467e4d53b081e5e Mon Sep 17 00:00:00 2001 From: decryptedchaos Date: Mon, 5 Jan 2026 19:57:03 -0600 Subject: [PATCH 02/10] Fix Per-frame call path --- main/main.cpp | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/main/main.cpp b/main/main.cpp index 7ccfc831704..eba7d410953 100644 --- a/main/main.cpp +++ b/main/main.cpp @@ -135,8 +135,6 @@ #include "modules/modules_enabled.gen.h" // For mono. - - #if defined(MODULE_MONO_ENABLED) && defined(TOOLS_ENABLED) #include "modules/mono/editor/bindings_generator.h" #endif @@ -3767,6 +3765,9 @@ Error Main::setup2(bool p_show_boot_logo) { Color Main::_get_boot_splash_bg_color() { #if defined(TOOLS_ENABLED) if (editor || project_manager) { + if (EditorSettings::get_singleton()) { + return EditorSettings::get_singleton()->get_setting("interface/theme/base_color"); + } return EditorSettings::get_setting_directly("interface/theme/base_color", EditorSettings::get_default_base_color()); } #endif From dbddacc7254262fa208a16d8cf36caa11a0bb466 Mon Sep 17 00:00:00 2001 From: decryptedchaos Date: Mon, 5 Jan 2026 20:16:52 -0600 Subject: [PATCH 03/10] Fix static check --- editor/settings/editor_settings.cpp | 3 +-- main/main.cpp | 8 ++++---- main/main.h | 2 +- servers/rendering/renderer_viewport.cpp | 4 ++-- 4 files changed, 8 insertions(+), 9 deletions(-) diff --git a/editor/settings/editor_settings.cpp b/editor/settings/editor_settings.cpp index 4bebc6f54a9..0adf9aa97f9 100644 --- a/editor/settings/editor_settings.cpp +++ b/editor/settings/editor_settings.cpp @@ -43,10 +43,10 @@ #include "core/io/resource_loader.h" #include "core/io/resource_saver.h" #include "core/object/class_db.h" -#include "core/variant/variant_parser.h" #include "core/os/keyboard.h" #include "core/os/os.h" #include "core/string/translation_server.h" +#include "core/variant/variant_parser.h" #include "core/version.h" #include "editor/editor_node.h" #include "editor/file_system/editor_paths.h" @@ -1290,7 +1290,6 @@ Color EditorSettings::get_default_base_color() { return Color(0.06, 0.09, 0.14); } - String EditorSettings::get_newest_settings_path() { const String config_file_name = vformat("editor_settings-%d.%d.tres", REDOT_VERSION_MAJOR, REDOT_VERSION_MINOR); return EditorPaths::get_singleton()->get_config_dir().path_join(config_file_name); diff --git a/main/main.cpp b/main/main.cpp index eba7d410953..94d8f491ec3 100644 --- a/main/main.cpp +++ b/main/main.cpp @@ -3166,7 +3166,7 @@ Error Main::setup2(bool p_show_boot_logo) { window_position = &position; } - Color boot_bg_color = _get_boot_splash_bg_color(); + Color boot_bg_color = get_boot_splash_bg_color(); DisplayServer::set_early_window_clear_color_override(true, boot_bg_color); DisplayServer::Context context; @@ -3481,7 +3481,7 @@ Error Main::setup2(bool p_show_boot_logo) { } } - Color clear = GLOBAL_DEF_BASIC("rendering/environment/defaults/default_clear_color", _get_boot_splash_bg_color()); + Color clear = GLOBAL_DEF_BASIC("rendering/environment/defaults/default_clear_color", get_boot_splash_bg_color()); RenderingServer::get_singleton()->set_default_clear_color(clear); if (p_show_boot_logo) { @@ -3762,7 +3762,7 @@ Error Main::setup2(bool p_show_boot_logo) { return OK; } -Color Main::_get_boot_splash_bg_color() { +Color Main::get_boot_splash_bg_color() { #if defined(TOOLS_ENABLED) if (editor || project_manager) { if (EditorSettings::get_singleton()) { @@ -3820,7 +3820,7 @@ void Main::setup_boot_logo() { boot_logo->set_pixel(0, 0, Color(0, 0, 0, 0)); } - Color boot_bg_color = _get_boot_splash_bg_color(); + Color boot_bg_color = get_boot_splash_bg_color(); if (boot_logo.is_valid()) { RenderingServer::get_singleton()->set_boot_image(boot_logo, boot_bg_color, boot_logo_scale, boot_logo_filter); diff --git a/main/main.h b/main/main.h index 8daff87cf9a..ac49a7d4d70 100644 --- a/main/main.h +++ b/main/main.h @@ -75,7 +75,7 @@ class Main { static Error setup2(bool p_show_boot_logo = true); // The thread calling setup2() will effectively become the main thread. static String get_rendering_driver_name(); static void setup_boot_logo(); - static Color _get_boot_splash_bg_color(); + static Color get_boot_splash_bg_color(); #ifdef TESTS_ENABLED static Error test_setup(); static void test_cleanup(); diff --git a/servers/rendering/renderer_viewport.cpp b/servers/rendering/renderer_viewport.cpp index a49b6ba56a2..975ee305207 100644 --- a/servers/rendering/renderer_viewport.cpp +++ b/servers/rendering/renderer_viewport.cpp @@ -35,9 +35,9 @@ #include "core/config/project_settings.h" #include "core/math/transform_interpolator.h" #include "core/object/worker_thread_pool.h" +#include "main/main.h" #include "renderer_canvas_cull.h" #include "renderer_scene_cull.h" -#include "main/main.h" #include "rendering_server_globals.h" #include "storage/texture_storage.h" @@ -747,7 +747,7 @@ void RendererViewport::draw_viewports(bool p_swap_buffers) { #endif // XR_DISABLED if (Engine::get_singleton()->is_editor_hint()) { - RSG::texture_storage->set_default_clear_color(Main::_get_boot_splash_bg_color()); + RSG::texture_storage->set_default_clear_color(Main::get_boot_splash_bg_color()); } if (sorted_active_viewports_dirty) { From 30f9304471ce148da082970f884280389a8adaeb Mon Sep 17 00:00:00 2001 From: decryptedchaos Date: Mon, 5 Jan 2026 20:57:59 -0600 Subject: [PATCH 04/10] fix docs --- doc/classes/ProjectSettings.xml | 7 ++----- 1 file changed, 2 insertions(+), 5 deletions(-) diff --git a/doc/classes/ProjectSettings.xml b/doc/classes/ProjectSettings.xml index 1397d975364..b37901c2d10 100644 --- a/doc/classes/ProjectSettings.xml +++ b/doc/classes/ProjectSettings.xml @@ -275,9 +275,6 @@ If [code]true[/code], [AnimationMixer] prints the warning of no matching object of the track path in the scene. - - Background color for the boot splash. - If [code]true[/code], scale the boot splash image to the full window size (preserving the aspect ratio) when the engine starts. If [code]false[/code], the engine will leave it at the default pixel size. @@ -2800,7 +2797,7 @@ The thread model to use for rendering. Rendering on a thread may improve performance, but synchronizing to the main thread can cause a bit more jitter. - + Default background clear color. Overridable per [Viewport] using its [Environment]. See [member Environment.background_mode] and [member Environment.background_color] in particular. To change this default color programmatically, use [method RenderingServer.set_default_clear_color]. @@ -3163,7 +3160,7 @@ This can be overridden using the [code]--rendering-method <method>[/code] command line argument. [b]Note:[/b] The actual rendering method may be automatically changed by the engine as a result of a fallback, or a user-specified command line argument. To get the actual rendering method that is used at runtime, use [method RenderingServer.get_current_rendering_method] instead of reading this project setting's value. - + Override for [member rendering/renderer/rendering_method] on mobile devices. From 1333d2f33519ec6a715db3a1282dae58fee603cf Mon Sep 17 00:00:00 2001 From: decryptedchaos Date: Mon, 5 Jan 2026 21:13:44 -0600 Subject: [PATCH 05/10] fix docs --- doc/classes/ProjectSettings.xml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/doc/classes/ProjectSettings.xml b/doc/classes/ProjectSettings.xml index 1397d975364..4c66dae10ac 100644 --- a/doc/classes/ProjectSettings.xml +++ b/doc/classes/ProjectSettings.xml @@ -2800,7 +2800,7 @@ The thread model to use for rendering. Rendering on a thread may improve performance, but synchronizing to the main thread can cause a bit more jitter. - + Default background clear color. Overridable per [Viewport] using its [Environment]. See [member Environment.background_mode] and [member Environment.background_color] in particular. To change this default color programmatically, use [method RenderingServer.set_default_clear_color]. @@ -3163,7 +3163,7 @@ This can be overridden using the [code]--rendering-method <method>[/code] command line argument. [b]Note:[/b] The actual rendering method may be automatically changed by the engine as a result of a fallback, or a user-specified command line argument. To get the actual rendering method that is used at runtime, use [method RenderingServer.get_current_rendering_method] instead of reading this project setting's value. - + Override for [member rendering/renderer/rendering_method] on mobile devices. From 53bcdeaca7c1fd1e47c3ca8e2314855ca0def2c6 Mon Sep 17 00:00:00 2001 From: decryptedchaos Date: Mon, 5 Jan 2026 21:13:44 -0600 Subject: [PATCH 06/10] fix docs From 685515ad1f8da586d6353d751e4d3c5b55e012e8 Mon Sep 17 00:00:00 2001 From: decryptedchaos Date: Mon, 5 Jan 2026 21:18:55 -0600 Subject: [PATCH 07/10] Fix missing doc member def --- doc/classes/ProjectSettings.xml | 3 +++ 1 file changed, 3 insertions(+) diff --git a/doc/classes/ProjectSettings.xml b/doc/classes/ProjectSettings.xml index b37901c2d10..4c66dae10ac 100644 --- a/doc/classes/ProjectSettings.xml +++ b/doc/classes/ProjectSettings.xml @@ -275,6 +275,9 @@ If [code]true[/code], [AnimationMixer] prints the warning of no matching object of the track path in the scene. + + Background color for the boot splash. + If [code]true[/code], scale the boot splash image to the full window size (preserving the aspect ratio) when the engine starts. If [code]false[/code], the engine will leave it at the default pixel size. From 0d6e4d041b43cb41b0c33619014ae4a7f29dea5f Mon Sep 17 00:00:00 2001 From: decryptedchaos Date: Mon, 5 Jan 2026 21:46:57 -0600 Subject: [PATCH 08/10] Update ProjectSettings.xml From 1c0ec7ba809b46b12a8ca6b51f992d3c9805488e Mon Sep 17 00:00:00 2001 From: decryptedchaos Date: Tue, 6 Jan 2026 07:44:05 -0600 Subject: [PATCH 09/10] Fix doc props generation Remove Unneeded files --- doc/classes/ProjectSettings.xml | 1 - main/main.cpp | 8 ++++++-- 2 files changed, 6 insertions(+), 3 deletions(-) diff --git a/doc/classes/ProjectSettings.xml b/doc/classes/ProjectSettings.xml index 4c66dae10ac..3178e90c2cb 100644 --- a/doc/classes/ProjectSettings.xml +++ b/doc/classes/ProjectSettings.xml @@ -276,7 +276,6 @@ If [code]true[/code], [AnimationMixer] prints the warning of no matching object of the track path in the scene. - Background color for the boot splash. If [code]true[/code], scale the boot splash image to the full window size (preserving the aspect ratio) when the engine starts. If [code]false[/code], the engine will leave it at the default pixel size. diff --git a/main/main.cpp b/main/main.cpp index 94d8f491ec3..1196cb1ca38 100644 --- a/main/main.cpp +++ b/main/main.cpp @@ -3772,7 +3772,7 @@ Color Main::get_boot_splash_bg_color() { } #endif - return GLOBAL_DEF_BASIC("application/boot_splash/bg_color", boot_splash_bg_color); + return GLOBAL_GET("application/boot_splash/bg_color"); } void Main::setup_boot_logo() { @@ -3820,8 +3820,8 @@ void Main::setup_boot_logo() { boot_logo->set_pixel(0, 0, Color(0, 0, 0, 0)); } - Color boot_bg_color = get_boot_splash_bg_color(); if (boot_logo.is_valid()) { + Color boot_bg_color = get_boot_splash_bg_color(); RenderingServer::get_singleton()->set_boot_image(boot_logo, boot_bg_color, boot_logo_scale, boot_logo_filter); } else { @@ -3834,6 +3834,7 @@ void Main::setup_boot_logo() { #endif MAIN_PRINT("Main: ClearColor"); + Color boot_bg_color = get_boot_splash_bg_color(); RenderingServer::get_singleton()->set_default_clear_color(boot_bg_color); MAIN_PRINT("Main: Image"); RenderingServer::get_singleton()->set_boot_image(splash, boot_bg_color, false); @@ -4026,6 +4027,9 @@ int Main::start() { // Needed to instance editor-only classes for their default values Engine::get_singleton()->set_editor_hint(true); + // Register boot_splash properties for doctool generation + GLOBAL_DEF(PropertyInfo(Variant::COLOR, "application/boot_splash/bg_color"), Color(0.14, 0.14, 0.14)); + // Translate the class reference only when `-l LOCALE` parameter is given. if (!locale.is_empty() && locale != "en") { load_doc_translations(locale); From deb187d3e3a3fc704e82f72e08dd3fac2dc74e3d Mon Sep 17 00:00:00 2001 From: decryptedchaos Date: Tue, 6 Jan 2026 08:49:26 -0600 Subject: [PATCH 10/10] Several Fixes suggested by CodeRabbit and Fixed Docs --- core/config/project_settings.cpp | 2 ++ doc/classes/ProjectSettings.xml | 4 ++-- main/main.cpp | 5 +---- 3 files changed, 5 insertions(+), 6 deletions(-) diff --git a/core/config/project_settings.cpp b/core/config/project_settings.cpp index 8f5a61e7a88..06eea7c8480 100644 --- a/core/config/project_settings.cpp +++ b/core/config/project_settings.cpp @@ -1578,6 +1578,8 @@ ProjectSettings::ProjectSettings() { GLOBAL_DEF("application/config/auto_accept_quit", true); GLOBAL_DEF("application/config/quit_on_go_back", true); + GLOBAL_DEF_BASIC("application/boot_splash/bg_color", Color(0.14, 0.14, 0.14)); + GLOBAL_DEF_BASIC(PropertyInfo(Variant::INT, "accessibility/general/accessibility_support", PROPERTY_HINT_ENUM, "Auto (When Screen Reader is Running),Always Active,Disabled"), 0); GLOBAL_DEF_BASIC(PropertyInfo(Variant::INT, "accessibility/general/updates_per_second", PROPERTY_HINT_RANGE, "1,100,1"), 60); diff --git a/doc/classes/ProjectSettings.xml b/doc/classes/ProjectSettings.xml index 3178e90c2cb..628e7e93448 100644 --- a/doc/classes/ProjectSettings.xml +++ b/doc/classes/ProjectSettings.xml @@ -2799,7 +2799,7 @@ The thread model to use for rendering. Rendering on a thread may improve performance, but synchronizing to the main thread can cause a bit more jitter. - + Default background clear color. Overridable per [Viewport] using its [Environment]. See [member Environment.background_mode] and [member Environment.background_color] in particular. To change this default color programmatically, use [method RenderingServer.set_default_clear_color]. @@ -3162,7 +3162,7 @@ This can be overridden using the [code]--rendering-method <method>[/code] command line argument. [b]Note:[/b] The actual rendering method may be automatically changed by the engine as a result of a fallback, or a user-specified command line argument. To get the actual rendering method that is used at runtime, use [method RenderingServer.get_current_rendering_method] instead of reading this project setting's value. - + Override for [member rendering/renderer/rendering_method] on mobile devices. diff --git a/main/main.cpp b/main/main.cpp index 1196cb1ca38..caf486868d0 100644 --- a/main/main.cpp +++ b/main/main.cpp @@ -1936,7 +1936,6 @@ Error Main::setup(const char *execpath, int argc, char *argv[], bool p_second_ph } else { #ifdef TOOLS_ENABLED editor = false; - project_manager = true; #else const String error_msg = "Error: Couldn't load project data at path \"" + project_path + "\". Is the .pck file missing?\nIf you've renamed the executable, the associated .pck file should also be renamed to match the executable's name (without the extension).\n"; OS::get_singleton()->print("%s", error_msg.utf8().get_data()); @@ -3166,6 +3165,7 @@ Error Main::setup2(bool p_show_boot_logo) { window_position = &position; } + GLOBAL_DEF(PropertyInfo(Variant::COLOR, "application/boot_splash/bg_color"), Color(0.14, 0.14, 0.14)); Color boot_bg_color = get_boot_splash_bg_color(); DisplayServer::set_early_window_clear_color_override(true, boot_bg_color); @@ -4027,9 +4027,6 @@ int Main::start() { // Needed to instance editor-only classes for their default values Engine::get_singleton()->set_editor_hint(true); - // Register boot_splash properties for doctool generation - GLOBAL_DEF(PropertyInfo(Variant::COLOR, "application/boot_splash/bg_color"), Color(0.14, 0.14, 0.14)); - // Translate the class reference only when `-l LOCALE` parameter is given. if (!locale.is_empty() && locale != "en") { load_doc_translations(locale);