Remove RenderingServer::map_scaling_option_to_stretch_mode and cleanup boot splash code
Removes RS as a dependency in `project_settings.cpp` (which was a bug, `core` shouldn't include `servers`). This doesn't have a big impact on incremental rebuild time by itself. Also move helper `get_splash_stretched_screen_rect` to RenderingServerTypes.
This commit is contained in:
@@ -44,7 +44,6 @@
|
||||
#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.
|
||||
@@ -636,7 +635,8 @@ void ProjectSettings::_convert_to_last_version(int p_from_version) {
|
||||
} 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")));
|
||||
// See RenderingServerEnums::SplashStretchMode.
|
||||
set_setting("application/boot_splash/stretch_mode", get_setting("application/boot_splash/fullsize") ? 1 : 0);
|
||||
set_setting("application/boot_splash/fullsize", Variant());
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user