summaryrefslogtreecommitdiff
path: root/main
diff options
context:
space:
mode:
Diffstat (limited to 'main')
-rw-r--r--main/SCsub13
-rw-r--r--main/main.cpp45
-rw-r--r--main/splash_editor.pngbin37471 -> 0 bytes
3 files changed, 36 insertions, 22 deletions
diff --git a/main/SCsub b/main/SCsub
index 87d64e48f9..79dc4bff15 100644
--- a/main/SCsub
+++ b/main/SCsub
@@ -20,12 +20,13 @@ env_main.CommandNoCache(
env.Run(main_builders.make_splash, "Building splash screen header."),
)
-env_main.Depends("#main/splash_editor.gen.h", "#main/splash_editor.png")
-env_main.CommandNoCache(
- "#main/splash_editor.gen.h",
- "#main/splash_editor.png",
- env.Run(main_builders.make_splash_editor, "Building editor splash screen header."),
-)
+if not env_main["no_editor_splash"]:
+ env_main.Depends("#main/splash_editor.gen.h", "#main/splash_editor.png")
+ env_main.CommandNoCache(
+ "#main/splash_editor.gen.h",
+ "#main/splash_editor.png",
+ env.Run(main_builders.make_splash_editor, "Building editor splash screen header."),
+ )
env_main.Depends("#main/app_icon.gen.h", "#main/app_icon.png")
env_main.CommandNoCache(
diff --git a/main/main.cpp b/main/main.cpp
index eb6e69e256..c7b33f3f1b 100644
--- a/main/main.cpp
+++ b/main/main.cpp
@@ -56,8 +56,6 @@
#include "main/main_timer_sync.h"
#include "main/performance.h"
#include "main/splash.gen.h"
-#include "main/splash_editor.gen.h"
-#include "modules/modules_enabled.gen.h"
#include "modules/register_module_types.h"
#include "platform/register_platform_apis.h"
#include "scene/main/scene_tree.h"
@@ -81,15 +79,18 @@
#endif
#ifdef TOOLS_ENABLED
-
#include "editor/doc_data_class_path.gen.h"
#include "editor/doc_tools.h"
#include "editor/editor_node.h"
#include "editor/editor_settings.h"
#include "editor/progress_dialog.h"
#include "editor/project_manager.h"
-
+#ifndef NO_EDITOR_SPLASH
+#include "main/splash_editor.gen.h"
#endif
+#endif
+
+#include "modules/modules_enabled.gen.h" // For mono.
/* Static members */
@@ -443,6 +444,9 @@ Error Main::test_setup() {
register_module_types();
register_driver_types();
+ // Theme needs modules to be initialized so that sub-resources can be loaded.
+ initialize_theme();
+
ERR_FAIL_COND_V(TextServerManager::get_singleton()->get_interface_count() == 0, ERR_CANT_CREATE);
TextServerManager::get_singleton()->set_primary_interface(TextServerManager::get_singleton()->get_interface(0));
@@ -1137,7 +1141,7 @@ Error Main::setup(const char *execpath, int argc, char *argv[], bool p_second_ph
FileAccess::make_default<FileAccessNetwork>(FileAccess::ACCESS_RESOURCES);
}
- if (globals->setup(project_path, main_pack, upwards) == OK) {
+ if (globals->setup(project_path, main_pack, upwards, editor) == OK) {
#ifdef TOOLS_ENABLED
found_project = true;
#endif
@@ -1701,9 +1705,10 @@ Error Main::setup2(Thread::ID p_main_tid_override) {
RenderingServer::get_singleton()->set_default_clear_color(clear);
if (show_logo) { //boot logo!
- String boot_logo_path = GLOBAL_DEF("application/boot_splash/image", String());
- bool boot_logo_scale = GLOBAL_DEF("application/boot_splash/fullsize", true);
- bool boot_logo_filter = GLOBAL_DEF("application/boot_splash/use_filter", true);
+ const bool boot_logo_image = GLOBAL_DEF("application/boot_splash/show_image", true);
+ const String boot_logo_path = String(GLOBAL_DEF("application/boot_splash/image", String())).strip_edges();
+ const bool boot_logo_scale = GLOBAL_DEF("application/boot_splash/fullsize", true);
+ const bool boot_logo_filter = GLOBAL_DEF("application/boot_splash/use_filter", true);
ProjectSettings::get_singleton()->set_custom_property_info("application/boot_splash/image",
PropertyInfo(Variant::STRING,
"application/boot_splash/image",
@@ -1711,14 +1716,19 @@ Error Main::setup2(Thread::ID p_main_tid_override) {
Ref<Image> boot_logo;
- boot_logo_path = boot_logo_path.strip_edges();
-
- if (boot_logo_path != String()) {
- boot_logo.instantiate();
- Error load_err = ImageLoader::load_image(boot_logo_path, boot_logo);
- if (load_err) {
- ERR_PRINT("Non-existing or invalid boot splash at '" + boot_logo_path + "'. Loading default splash.");
+ if (boot_logo_image) {
+ if (boot_logo_path != String()) {
+ boot_logo.instantiate();
+ Error load_err = ImageLoader::load_image(boot_logo_path, boot_logo);
+ if (load_err) {
+ ERR_PRINT("Non-existing or invalid boot splash at '" + boot_logo_path + "'. Loading default splash.");
+ }
}
+ } else {
+ // Create a 1×1 transparent image. This will effectively hide the splash image.
+ boot_logo.instantiate();
+ boot_logo->create(1, 1, false, Image::FORMAT_RGBA8);
+ boot_logo->set_pixel(0, 0, Color(0, 0, 0, 0));
}
#if defined(TOOLS_ENABLED) && !defined(NO_EDITOR_SPLASH)
@@ -1877,6 +1887,9 @@ Error Main::setup2(Thread::ID p_main_tid_override) {
register_platform_apis();
register_module_types();
+ // Theme needs modules to be initialized so that sub-resources can be loaded.
+ initialize_theme();
+
GLOBAL_DEF("display/mouse_cursor/custom_image", String());
GLOBAL_DEF("display/mouse_cursor/custom_image_hotspot", Vector2());
GLOBAL_DEF("display/mouse_cursor/tooltip_position_offset", Point2(10, 10));
@@ -2050,7 +2063,7 @@ bool Main::start() {
GLOBAL_DEF("mono/debugger_agent/wait_timeout", 3000);
GLOBAL_DEF("mono/profiler/args", "log:calls,alloc,sample,output=output.mlpd");
GLOBAL_DEF("mono/profiler/enabled", false);
- GLOBAL_DEF("mono/unhandled_exception_policy", 0);
+ GLOBAL_DEF("mono/runtime/unhandled_exception_policy", 0);
#endif
DocTools doc;
diff --git a/main/splash_editor.png b/main/splash_editor.png
deleted file mode 100644
index 49af9fde22..0000000000
--- a/main/splash_editor.png
+++ /dev/null
Binary files differ