Add Stretch Modes for Splash Screen

Co-authored-by: Samuel Pedrajas <samuelpedrajaspz@gmail.com>
This commit is contained in:
Justin Sasso
2025-08-13 20:59:57 -04:00
parent c7b1767560
commit b6b3e1ef9e
16 changed files with 178 additions and 46 deletions

View File

@ -43,6 +43,7 @@
#include "core/variant/typed_array.h"
#include "core/variant/variant_parser.h"
#include "core/version.h"
#include "servers/rendering/rendering_server.h"
#ifdef TOOLS_ENABLED
#include "modules/modules_enabled.gen.h" // For mono.
@ -600,6 +601,12 @@ void ProjectSettings::_convert_to_last_version(int p_from_version) {
E.value.variant = action;
}
}
} else if (p_from_version <= 6) {
// Check if we still have legacy boot splash (removed in 4.6), map it to new project setting, then remove legacy setting.
if (has_setting("application/boot_splash/fullsize")) {
set_setting("application/boot_splash/stretch_mode", RenderingServer::map_scaling_option_to_stretch_mode(get_setting("application/boot_splash/fullsize")));
set_setting("application/boot_splash/fullsize", Variant());
}
}
#endif // DISABLE_DEPRECATED
}