summaryrefslogtreecommitdiff
path: root/main
diff options
context:
space:
mode:
Diffstat (limited to 'main')
-rw-r--r--main/main.cpp16
1 files changed, 13 insertions, 3 deletions
diff --git a/main/main.cpp b/main/main.cpp
index f0e376a045..517ccaec08 100644
--- a/main/main.cpp
+++ b/main/main.cpp
@@ -767,13 +767,23 @@ Error Main::setup2() {
#endif
if (show_logo) { //boot logo!
- Image boot_logo=GLOBAL_DEF("application/boot_logo",Image());
+ String boot_logo_path=GLOBAL_DEF("application/boot_splash",String());
+ bool boot_logo_scale=GLOBAL_DEF("application/boot_splash_fullsize",true);
+ Globals::get_singleton()->set_custom_property_info("application/boot_splash",PropertyInfo(Variant::STRING,"application/boot_splash",PROPERTY_HINT_FILE,"*.png"));
+
+
+ Image boot_logo;
+
+ if (boot_logo_path.strip_edges()!="" && FileAccess::exists(boot_logo_path)) {
+ boot_logo.load(boot_logo_path);
+ }
if (!boot_logo.empty()) {
+ OS::get_singleton()->_msec_splash=OS::get_singleton()->get_ticks_msec();
Color clear = GLOBAL_DEF("render/default_clear_color",Color(0.3,0.3,0.3));
VisualServer::get_singleton()->set_default_clear_color(clear);
Color boot_bg = GLOBAL_DEF("application/boot_bg_color", clear);
- VisualServer::get_singleton()->set_boot_image(boot_logo, boot_bg);
+ 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)
Globals::get_singleton()->set("application/boot_logo",Image());
@@ -788,7 +798,7 @@ Error Main::setup2() {
MAIN_PRINT("Main: ClearColor");
VisualServer::get_singleton()->set_default_clear_color(boot_splash_bg_color);
MAIN_PRINT("Main: Image");
- VisualServer::get_singleton()->set_boot_image(splash, boot_splash_bg_color);
+ VisualServer::get_singleton()->set_boot_image(splash, boot_splash_bg_color,false);
#endif
MAIN_PRINT("Main: DCC");
VisualServer::get_singleton()->set_default_clear_color(GLOBAL_DEF("render/default_clear_color",Color(0.3,0.3,0.3)));