summaryrefslogtreecommitdiff
path: root/main
diff options
context:
space:
mode:
authorRémi Verschelde <rverschelde@gmail.com>2022-01-19 16:09:52 +0100
committerRémi Verschelde <rverschelde@gmail.com>2022-01-19 16:09:52 +0100
commitcba2fd2e8080dc999c0473ca09ba23d30fe8cf42 (patch)
treeef0fde4f88ccd116e3ab603ce86a3a8233e71c7d /main
parent82efb1d262aea24b5f742820017fd11c496c3f8c (diff)
Revert "Add new scaling modes for splash screen"
This reverts commit fcc9f5ce396ff921ed8253f657a8c9c38e7a878d. The feature is good but the implementation still needs more work. A new PR will be made with a rework of this commit.
Diffstat (limited to 'main')
-rw-r--r--main/main.cpp17
1 files changed, 7 insertions, 10 deletions
diff --git a/main/main.cpp b/main/main.cpp
index add37def8c..8b58641461 100644
--- a/main/main.cpp
+++ b/main/main.cpp
@@ -1728,15 +1728,11 @@ Error Main::setup2(Thread::ID p_main_tid_override) {
if (show_logo) { //boot logo!
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 RenderingServer::SplashStretchMode boot_stretch_mode =
- (RenderingServer::SplashStretchMode)(int)GLOBAL_DEF("application/boot_splash/stretch_mode", RenderingServer::SPLASH_STRETCH_MODE_KEEP);
+ 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/stretch_mode",
- PropertyInfo(Variant::INT, "application/boot_splash/stretch_mode",
- PROPERTY_HINT_ENUM, "Disabled,Keep,Keep Width,Keep Height,Cover,Expand")); // Sync with RenderingServer::SplashStretchMode.
ProjectSettings::get_singleton()->set_custom_property_info("application/boot_splash/image",
- PropertyInfo(Variant::STRING, "application/boot_splash/image",
+ PropertyInfo(Variant::STRING,
+ "application/boot_splash/image",
PROPERTY_HINT_FILE, "*.png"));
Ref<Image> boot_logo;
@@ -1764,8 +1760,9 @@ Error Main::setup2(Thread::ID p_main_tid_override) {
const Color boot_bg_color = GLOBAL_DEF("application/boot_splash/bg_color", boot_splash_bg_color);
#endif
if (boot_logo.is_valid()) {
- RenderingServer::get_singleton()->set_boot_image(boot_logo, boot_bg_color,
- boot_stretch_mode, boot_logo_filter);
+ RenderingServer::get_singleton()->set_boot_image(boot_logo, boot_bg_color, boot_logo_scale,
+ boot_logo_filter);
+
} else {
#ifndef NO_DEFAULT_BOOT_LOGO
MAIN_PRINT("Main: Create bootsplash");
@@ -1778,7 +1775,7 @@ Error Main::setup2(Thread::ID p_main_tid_override) {
MAIN_PRINT("Main: ClearColor");
RenderingServer::get_singleton()->set_default_clear_color(boot_bg_color);
MAIN_PRINT("Main: Image");
- RenderingServer::get_singleton()->set_boot_image(splash, boot_bg_color, RenderingServer::SPLASH_STRETCH_MODE_DISABLED);
+ RenderingServer::get_singleton()->set_boot_image(splash, boot_bg_color, false);
#endif
}