diff options
author | RĂ©mi Verschelde <rverschelde@gmail.com> | 2018-09-14 21:48:39 +0200 |
---|---|---|
committer | GitHub <noreply@github.com> | 2018-09-14 21:48:39 +0200 |
commit | f7a6709f5ea809dded8c1c660aeaa01eab745c1e (patch) | |
tree | e16143303b97a80d672ac6dee2e16b129b0a2fd2 | |
parent | 1eed12f6d8076ac2ddf134186eccf22de9bb4ee2 (diff) | |
parent | de644a628df989d0529a4dac0dabd81ed159a1fa (diff) |
Merge pull request #22078 from akien-mga/boot_bg_color
Make boot splash background color always configurable
-rw-r--r-- | main/main.cpp | 14 |
1 files changed, 4 insertions, 10 deletions
diff --git a/main/main.cpp b/main/main.cpp index 34aca032da..90d4db2948 100644 --- a/main/main.cpp +++ b/main/main.cpp @@ -1096,30 +1096,24 @@ Error Main::setup2(Thread::ID p_main_tid_override) { ERR_PRINTS("Non-existing or invalid boot splash at: " + boot_logo_path + ". Loading default splash."); } + Color boot_bg_color = GLOBAL_DEF("application/boot_splash/bg_color", boot_splash_bg_color); if (boot_logo.is_valid()) { OS::get_singleton()->_msec_splash = OS::get_singleton()->get_ticks_msec(); - Color boot_bg = GLOBAL_DEF("application/boot_splash/bg_color", clear); - VisualServer::get_singleton()->set_boot_image(boot_logo, boot_bg, boot_logo_scale); -#ifndef TOOLS_ENABLED -//no tools, so free the boot logo (no longer needed) -//ProjectSettings::get_singleton()->set("application/boot_logo",Image()); -#endif + VisualServer::get_singleton()->set_boot_image(boot_logo, boot_bg_color, boot_logo_scale); } else { #ifndef NO_DEFAULT_BOOT_LOGO - MAIN_PRINT("Main: Create bootsplash"); #if defined(TOOLS_ENABLED) && !defined(NO_EDITOR_SPLASH) - Ref<Image> splash = (editor || project_manager) ? memnew(Image(boot_splash_editor_png)) : memnew(Image(boot_splash_png)); #else Ref<Image> splash = memnew(Image(boot_splash_png)); #endif MAIN_PRINT("Main: ClearColor"); - VisualServer::get_singleton()->set_default_clear_color(boot_splash_bg_color); + VisualServer::get_singleton()->set_default_clear_color(boot_bg_color); MAIN_PRINT("Main: Image"); - VisualServer::get_singleton()->set_boot_image(splash, boot_splash_bg_color, false); + VisualServer::get_singleton()->set_boot_image(splash, boot_bg_color, false); #endif } |