feat: updated godot version
This commit is contained in:
parent
0c508b0831
commit
42b028dbb5
4694 changed files with 236470 additions and 401376 deletions
|
|
@ -30,7 +30,6 @@
|
|||
|
||||
#include "main.h"
|
||||
|
||||
#include "core/config/engine.h"
|
||||
#include "core/config/project_settings.h"
|
||||
#include "core/core_globals.h"
|
||||
#include "core/crypto/crypto.h"
|
||||
|
|
@ -46,24 +45,23 @@
|
|||
#include "core/io/file_access_zip.h"
|
||||
#include "core/io/image.h"
|
||||
#include "core/io/image_loader.h"
|
||||
#include "core/io/ip.h"
|
||||
#include "core/io/resource_loader.h"
|
||||
#include "core/io/resource_saver.h"
|
||||
#include "core/object/class_db.h"
|
||||
#include "core/object/message_queue.h"
|
||||
#include "core/object/script_language.h"
|
||||
#include "core/os/os.h"
|
||||
#include "core/os/process_id.h"
|
||||
#include "core/os/time.h"
|
||||
#include "core/profiling/profiling.h"
|
||||
#include "core/register_core_types.h"
|
||||
#include "core/string/translation_server.h"
|
||||
#include "core/variant/variant_parser.h"
|
||||
#include "core/version.h"
|
||||
#include "drivers/register_driver_types.h"
|
||||
#include "main/app_icon.gen.h"
|
||||
#include "main/main_timer_sync.h"
|
||||
#include "main/performance.h"
|
||||
#include "main/splash.gen.h"
|
||||
#include "modules/register_module_types.h"
|
||||
#include "platform/register_platform_apis.h"
|
||||
#include "scene/main/scene_tree.h"
|
||||
#include "scene/main/window.h"
|
||||
#include "scene/property_list_helper.h"
|
||||
|
|
@ -73,22 +71,17 @@
|
|||
#include "servers/audio/audio_driver_dummy.h"
|
||||
#include "servers/audio/audio_server.h"
|
||||
#include "servers/camera/camera_server.h"
|
||||
#include "servers/display/accessibility_server.h"
|
||||
#include "servers/display/display_server.h"
|
||||
#include "servers/movie_writer/movie_writer.h"
|
||||
#include "servers/register_server_types.h"
|
||||
#include "servers/rendering/rendering_device.h"
|
||||
#include "servers/rendering/rendering_server.h"
|
||||
#include "servers/rendering/rendering_server_default.h"
|
||||
#include "servers/text/text_server.h"
|
||||
#include "servers/text/text_server_dummy.h"
|
||||
|
||||
#include "modules/register_module_types.h"
|
||||
#include "platform/register_platform_apis.h"
|
||||
|
||||
// 2D
|
||||
#ifndef NAVIGATION_2D_DISABLED
|
||||
#include "servers/navigation_2d/navigation_server_2d.h"
|
||||
#include "servers/navigation_2d/navigation_server_2d_dummy.h"
|
||||
#endif // NAVIGATION_2D_DISABLED
|
||||
|
||||
#ifndef PHYSICS_2D_DISABLED
|
||||
|
|
@ -99,6 +92,7 @@
|
|||
// 3D
|
||||
#ifndef NAVIGATION_3D_DISABLED
|
||||
#include "servers/navigation_3d/navigation_server_3d.h"
|
||||
#include "servers/navigation_3d/navigation_server_3d_dummy.h"
|
||||
#endif // NAVIGATION_3D_DISABLED
|
||||
|
||||
#ifndef PHYSICS_3D_DISABLED
|
||||
|
|
@ -111,7 +105,6 @@
|
|||
#endif // XR_DISABLED
|
||||
|
||||
#ifdef TESTS_ENABLED
|
||||
#include "servers/rendering/dummy/rasterizer_dummy.h"
|
||||
#include "tests/test_main.h"
|
||||
#endif
|
||||
|
||||
|
|
@ -180,7 +173,6 @@ static SteamTracker *steam_tracker = nullptr;
|
|||
// Initialized in setup2()
|
||||
static AudioServer *audio_server = nullptr;
|
||||
static CameraServer *camera_server = nullptr;
|
||||
static AccessibilityServer *accessibility_server = nullptr;
|
||||
static DisplayServer *display_server = nullptr;
|
||||
static RenderingServer *rendering_server = nullptr;
|
||||
static TextServerManager *tsman = nullptr;
|
||||
|
|
@ -204,13 +196,14 @@ static bool _start_success = false;
|
|||
String display_driver = "";
|
||||
String tablet_driver = "";
|
||||
String text_driver = "";
|
||||
String rendering_driver = "";
|
||||
String rendering_method = "";
|
||||
static int text_driver_idx = -1;
|
||||
static int audio_driver_idx = -1;
|
||||
|
||||
// Engine config/tools
|
||||
|
||||
static AccessibilityServerEnums::AccessibilityMode accessibility_mode = AccessibilityServerEnums::AccessibilityMode::ACCESSIBILITY_AUTO;
|
||||
static String accessibility_driver_name;
|
||||
static DisplayServer::AccessibilityMode accessibility_mode = DisplayServer::AccessibilityMode::ACCESSIBILITY_AUTO;
|
||||
static bool accessibility_mode_set = false;
|
||||
static bool single_window = false;
|
||||
static bool editor = false;
|
||||
|
|
@ -220,7 +213,7 @@ static String locale;
|
|||
static String log_file;
|
||||
static bool show_help = false;
|
||||
static uint64_t quit_after = 0;
|
||||
static ProcessID editor_pid = 0;
|
||||
static OS::ProcessID editor_pid = 0;
|
||||
#ifdef TOOLS_ENABLED
|
||||
static bool found_project = false;
|
||||
static bool recovery_mode = false;
|
||||
|
|
@ -239,13 +232,13 @@ static bool single_threaded_scene = false;
|
|||
|
||||
// Display
|
||||
|
||||
static DisplayServerEnums::WindowMode window_mode = DisplayServerEnums::WINDOW_MODE_WINDOWED;
|
||||
static DisplayServerEnums::ScreenOrientation window_orientation = DisplayServerEnums::SCREEN_LANDSCAPE;
|
||||
static DisplayServerEnums::VSyncMode window_vsync_mode = DisplayServerEnums::VSYNC_ENABLED;
|
||||
static DisplayServer::WindowMode window_mode = DisplayServer::WINDOW_MODE_WINDOWED;
|
||||
static DisplayServer::ScreenOrientation window_orientation = DisplayServer::SCREEN_LANDSCAPE;
|
||||
static DisplayServer::VSyncMode window_vsync_mode = DisplayServer::VSYNC_ENABLED;
|
||||
static uint32_t window_flags = 0;
|
||||
static Size2i window_size = Size2i(1152, 648);
|
||||
|
||||
static int init_screen = DisplayServerEnums::SCREEN_PRIMARY;
|
||||
static int init_screen = DisplayServer::SCREEN_PRIMARY;
|
||||
static bool init_fullscreen = false;
|
||||
static bool init_maximized = false;
|
||||
static bool init_windowed = false;
|
||||
|
|
@ -415,7 +408,6 @@ void finalize_display() {
|
|||
memdelete(rendering_server);
|
||||
|
||||
memdelete(display_server);
|
||||
memdelete(accessibility_server);
|
||||
}
|
||||
|
||||
void initialize_theme_db() {
|
||||
|
|
@ -642,7 +634,6 @@ void Main::print_help(const char *p_binary) {
|
|||
#endif
|
||||
print_help_option("--wid <window_id>", "Request parented to window.\n");
|
||||
print_help_option("--accessibility <mode>", "Select accessibility mode ['auto' (when screen reader is running, default), 'always', 'disabled'].\n");
|
||||
print_help_option("--accessibility-driver <driver>", "Select accessibility driver ['accesskit', 'dummy'].\n");
|
||||
|
||||
print_help_title("Debug options");
|
||||
print_help_option("-d, --debug", "Debug (local stdout debugger).\n");
|
||||
|
|
@ -732,12 +723,7 @@ void Main::print_help(const char *p_binary) {
|
|||
OS::get_singleton()->print("\n");
|
||||
}
|
||||
|
||||
#ifndef TESTS_ENABLED
|
||||
Error Main::test_setup() {
|
||||
ERR_FAIL_V(ERR_UNAVAILABLE);
|
||||
}
|
||||
void Main::test_cleanup() {}
|
||||
#else
|
||||
#ifdef TESTS_ENABLED
|
||||
// The order is the same as in `Main::setup()`, only core and some editor types
|
||||
// are initialized here. This also combines `Main::setup2()` initialization.
|
||||
Error Main::test_setup() {
|
||||
|
|
@ -746,8 +732,6 @@ Error Main::test_setup() {
|
|||
|
||||
OS::get_singleton()->initialize();
|
||||
|
||||
CoreGlobals::print_ready = true;
|
||||
|
||||
engine = memnew(Engine);
|
||||
|
||||
register_core_types();
|
||||
|
|
@ -804,13 +788,6 @@ Error Main::test_setup() {
|
|||
translation_server->load_project_translations(translation_server->get_main_domain());
|
||||
ResourceLoader::load_translation_remaps(); //load remaps for resources
|
||||
|
||||
message_queue = memnew(MessageQueue);
|
||||
|
||||
RasterizerDummy::make_current();
|
||||
rendering_server = memnew(RenderingServerDefault());
|
||||
rendering_server->init();
|
||||
rendering_server->set_render_loop_enabled(false);
|
||||
|
||||
// Initialize ThemeDB early so that scene types can register their theme items.
|
||||
// Default theme will be initialized later, after modules and ScriptServer are ready.
|
||||
initialize_theme_db();
|
||||
|
|
@ -881,9 +858,6 @@ Error Main::test_setup() {
|
|||
void Main::test_cleanup() {
|
||||
ERR_FAIL_COND(!_start_success);
|
||||
|
||||
// Printing in the usual way can become problematic during/after cleanup.
|
||||
CoreGlobals::print_ready = false;
|
||||
|
||||
for (int i = 0; i < TextServerManager::get_singleton()->get_interface_count(); i++) {
|
||||
TextServerManager::get_singleton()->get_interface(i)->cleanup();
|
||||
}
|
||||
|
|
@ -907,17 +881,6 @@ void Main::test_cleanup() {
|
|||
|
||||
finalize_theme_db();
|
||||
|
||||
if (rendering_server) {
|
||||
rendering_server->sync();
|
||||
rendering_server->global_shader_parameters_clear();
|
||||
rendering_server->finish();
|
||||
memdelete(rendering_server);
|
||||
}
|
||||
if (message_queue) {
|
||||
message_queue->flush();
|
||||
memdelete(message_queue);
|
||||
}
|
||||
|
||||
#ifndef NAVIGATION_2D_DISABLED
|
||||
NavigationServer2DManager::finalize_server();
|
||||
NavigationServer2DManager::finalize_server_manager();
|
||||
|
|
@ -969,7 +932,7 @@ void Main::test_cleanup() {
|
|||
|
||||
OS::get_singleton()->finalize_core();
|
||||
}
|
||||
#endif // TESTS_ENABLED
|
||||
#endif
|
||||
|
||||
int Main::test_entrypoint(int argc, char *argv[], bool &tests_need_run) {
|
||||
for (int x = 0; x < argc; x++) {
|
||||
|
|
@ -1031,8 +994,6 @@ Error Main::setup(const char *execpath, int argc, char *argv[], bool p_second_ph
|
|||
|
||||
OS::get_singleton()->initialize();
|
||||
|
||||
CoreGlobals::print_ready = true;
|
||||
|
||||
#if !defined(OVERRIDE_PATH_ENABLED) && !defined(TOOLS_ENABLED)
|
||||
String old_cwd = OS::get_singleton()->get_cwd();
|
||||
#if defined(MACOS_ENABLED) || defined(APPLE_EMBEDDED_ENABLED)
|
||||
|
|
@ -1122,10 +1083,6 @@ Error Main::setup(const char *execpath, int argc, char *argv[], bool p_second_ph
|
|||
bool delta_smoothing_override = false;
|
||||
bool load_shell_env = false;
|
||||
|
||||
String rendering_driver = "";
|
||||
String rendering_method = "";
|
||||
OS::RenderingSource rendering_driver_source = OS::RenderingSource::RENDERING_SOURCE_DEFAULT;
|
||||
OS::RenderingSource rendering_method_source = OS::RenderingSource::RENDERING_SOURCE_DEFAULT;
|
||||
String default_renderer = "";
|
||||
String default_renderer_mobile = "";
|
||||
String renderer_hints = "";
|
||||
|
|
@ -1323,7 +1280,6 @@ Error Main::setup(const char *execpath, int argc, char *argv[], bool p_second_ph
|
|||
} else if (arg == "--rendering-driver") {
|
||||
if (N) {
|
||||
rendering_driver = N->get();
|
||||
rendering_driver_source = OS::RenderingSource::RENDERING_SOURCE_COMMANDLINE;
|
||||
N = N->next();
|
||||
} else {
|
||||
OS::get_singleton()->print("Missing rendering driver argument, aborting.\n");
|
||||
|
|
@ -1331,10 +1287,10 @@ Error Main::setup(const char *execpath, int argc, char *argv[], bool p_second_ph
|
|||
}
|
||||
} else if (arg == "-f" || arg == "--fullscreen") { // force fullscreen
|
||||
init_fullscreen = true;
|
||||
window_mode = DisplayServerEnums::WINDOW_MODE_FULLSCREEN;
|
||||
window_mode = DisplayServer::WINDOW_MODE_FULLSCREEN;
|
||||
} else if (arg == "-m" || arg == "--maximized") { // force maximized window
|
||||
init_maximized = true;
|
||||
window_mode = DisplayServerEnums::WINDOW_MODE_MAXIMIZED;
|
||||
window_mode = DisplayServer::WINDOW_MODE_MAXIMIZED;
|
||||
} else if (arg == "-w" || arg == "--windowed") { // force windowed window
|
||||
|
||||
init_windowed = true;
|
||||
|
|
@ -1398,13 +1354,13 @@ Error Main::setup(const char *execpath, int argc, char *argv[], bool p_second_ph
|
|||
if (N) {
|
||||
String string = N->get();
|
||||
if (string == "auto") {
|
||||
accessibility_mode = AccessibilityServerEnums::AccessibilityMode::ACCESSIBILITY_AUTO;
|
||||
accessibility_mode = DisplayServer::AccessibilityMode::ACCESSIBILITY_AUTO;
|
||||
accessibility_mode_set = true;
|
||||
} else if (string == "always") {
|
||||
accessibility_mode = AccessibilityServerEnums::AccessibilityMode::ACCESSIBILITY_ALWAYS;
|
||||
accessibility_mode = DisplayServer::AccessibilityMode::ACCESSIBILITY_ALWAYS;
|
||||
accessibility_mode_set = true;
|
||||
} else if (string == "disabled") {
|
||||
accessibility_mode = AccessibilityServerEnums::AccessibilityMode::ACCESSIBILITY_DISABLED;
|
||||
accessibility_mode = DisplayServer::AccessibilityMode::ACCESSIBILITY_DISABLED;
|
||||
accessibility_mode_set = true;
|
||||
} else {
|
||||
OS::get_singleton()->print("Accessibility mode argument not recognized, aborting.\n");
|
||||
|
|
@ -1415,15 +1371,6 @@ Error Main::setup(const char *execpath, int argc, char *argv[], bool p_second_ph
|
|||
OS::get_singleton()->print("Missing accessibility mode argument, aborting.\n");
|
||||
goto error;
|
||||
}
|
||||
} else if (arg == "--accessibility-driver") {
|
||||
if (N) {
|
||||
String string = N->get();
|
||||
accessibility_driver_name = string;
|
||||
N = N->next();
|
||||
} else {
|
||||
OS::get_singleton()->print("Missing accessibility driver argument, aborting.\n");
|
||||
goto error;
|
||||
}
|
||||
} else if (arg == "-t" || arg == "--always-on-top") { // force always-on-top window
|
||||
|
||||
init_always_on_top = true;
|
||||
|
|
@ -2203,7 +2150,7 @@ Error Main::setup(const char *execpath, int argc, char *argv[], bool p_second_ph
|
|||
main_args.push_back("--editor");
|
||||
if (!init_windowed && !init_fullscreen) {
|
||||
init_maximized = true;
|
||||
window_mode = DisplayServerEnums::WINDOW_MODE_MAXIMIZED;
|
||||
window_mode = DisplayServer::WINDOW_MODE_MAXIMIZED;
|
||||
}
|
||||
}
|
||||
|
||||
|
|
@ -2389,11 +2336,11 @@ Error Main::setup(const char *execpath, int argc, char *argv[], bool p_second_ph
|
|||
|
||||
Array force_angle_list;
|
||||
|
||||
#define FORCE_ANGLE(m_vendor, m_name) \
|
||||
{ \
|
||||
Dictionary device; \
|
||||
device["vendor"] = m_vendor; \
|
||||
device["name"] = m_name; \
|
||||
#define FORCE_ANGLE(m_vendor, m_name) \
|
||||
{ \
|
||||
Dictionary device; \
|
||||
device["vendor"] = m_vendor; \
|
||||
device["name"] = m_name; \
|
||||
force_angle_list.push_back(device); \
|
||||
}
|
||||
|
||||
|
|
@ -2625,7 +2572,6 @@ Error Main::setup(const char *execpath, int argc, char *argv[], bool p_second_ph
|
|||
// Default to ProjectSettings default if nothing set on the command line.
|
||||
if (rendering_method.is_empty()) {
|
||||
rendering_method = GLOBAL_GET("rendering/renderer/rendering_method");
|
||||
rendering_method_source = OS::RenderingSource::RENDERING_SOURCE_PROJECT_SETTING;
|
||||
}
|
||||
|
||||
if (rendering_driver.is_empty()) {
|
||||
|
|
@ -2633,18 +2579,16 @@ Error Main::setup(const char *execpath, int argc, char *argv[], bool p_second_ph
|
|||
rendering_driver = "dummy";
|
||||
} else if (rendering_method == "gl_compatibility") {
|
||||
rendering_driver = GLOBAL_GET("rendering/gl_compatibility/driver");
|
||||
rendering_driver_source = OS::RenderingSource::RENDERING_SOURCE_PROJECT_SETTING;
|
||||
} else {
|
||||
rendering_driver = GLOBAL_GET("rendering/rendering_device/driver");
|
||||
rendering_driver_source = OS::RenderingSource::RENDERING_SOURCE_PROJECT_SETTING;
|
||||
}
|
||||
}
|
||||
|
||||
// always convert to lower case for consistency in the code
|
||||
rendering_driver = rendering_driver.to_lower();
|
||||
|
||||
OS::get_singleton()->set_current_rendering_driver_name(rendering_driver, rendering_driver_source);
|
||||
OS::get_singleton()->set_current_rendering_method(rendering_method, rendering_method_source);
|
||||
OS::get_singleton()->set_current_rendering_driver_name(rendering_driver);
|
||||
OS::get_singleton()->set_current_rendering_method(rendering_method);
|
||||
|
||||
#ifdef TOOLS_ENABLED
|
||||
if (!force_res && project_manager) {
|
||||
|
|
@ -2674,33 +2618,33 @@ Error Main::setup(const char *execpath, int argc, char *argv[], bool p_second_ph
|
|||
}
|
||||
|
||||
if (!bool(GLOBAL_GET("display/window/size/resizable"))) {
|
||||
window_flags |= DisplayServerEnums::WINDOW_FLAG_RESIZE_DISABLED_BIT;
|
||||
window_flags |= DisplayServer::WINDOW_FLAG_RESIZE_DISABLED_BIT;
|
||||
}
|
||||
if (bool(GLOBAL_GET("display/window/size/minimize_disabled"))) {
|
||||
window_flags |= DisplayServerEnums::WINDOW_FLAG_MINIMIZE_DISABLED_BIT;
|
||||
window_flags |= DisplayServer::WINDOW_FLAG_MINIMIZE_DISABLED_BIT;
|
||||
}
|
||||
if (bool(GLOBAL_GET("display/window/size/maximize_disabled"))) {
|
||||
window_flags |= DisplayServerEnums::WINDOW_FLAG_MAXIMIZE_DISABLED_BIT;
|
||||
window_flags |= DisplayServer::WINDOW_FLAG_MAXIMIZE_DISABLED_BIT;
|
||||
}
|
||||
if (bool(GLOBAL_GET("display/window/size/borderless"))) {
|
||||
window_flags |= DisplayServerEnums::WINDOW_FLAG_BORDERLESS_BIT;
|
||||
window_flags |= DisplayServer::WINDOW_FLAG_BORDERLESS_BIT;
|
||||
}
|
||||
if (bool(GLOBAL_GET("display/window/size/always_on_top"))) {
|
||||
window_flags |= DisplayServerEnums::WINDOW_FLAG_ALWAYS_ON_TOP_BIT;
|
||||
window_flags |= DisplayServer::WINDOW_FLAG_ALWAYS_ON_TOP_BIT;
|
||||
}
|
||||
if (bool(GLOBAL_GET("display/window/size/transparent"))) {
|
||||
window_flags |= DisplayServerEnums::WINDOW_FLAG_TRANSPARENT_BIT;
|
||||
window_flags |= DisplayServer::WINDOW_FLAG_TRANSPARENT_BIT;
|
||||
}
|
||||
if (bool(GLOBAL_GET("display/window/size/extend_to_title"))) {
|
||||
window_flags |= DisplayServerEnums::WINDOW_FLAG_EXTEND_TO_TITLE_BIT;
|
||||
window_flags |= DisplayServer::WINDOW_FLAG_EXTEND_TO_TITLE_BIT;
|
||||
}
|
||||
if (bool(GLOBAL_GET("display/window/size/no_focus"))) {
|
||||
window_flags |= DisplayServerEnums::WINDOW_FLAG_NO_FOCUS_BIT;
|
||||
window_flags |= DisplayServer::WINDOW_FLAG_NO_FOCUS_BIT;
|
||||
}
|
||||
if (bool(GLOBAL_GET("display/window/size/sharp_corners"))) {
|
||||
window_flags |= DisplayServerEnums::WINDOW_FLAG_SHARP_CORNERS_BIT;
|
||||
window_flags |= DisplayServer::WINDOW_FLAG_SHARP_CORNERS_BIT;
|
||||
}
|
||||
window_mode = (DisplayServerEnums::WindowMode)(GLOBAL_GET("display/window/size/mode").operator int());
|
||||
window_mode = (DisplayServer::WindowMode)(GLOBAL_GET("display/window/size/mode").operator int());
|
||||
int initial_position_type = GLOBAL_GET("display/window/size/initial_position_type").operator int();
|
||||
if (initial_position_type == Window::WINDOW_INITIAL_POSITION_ABSOLUTE) { // Absolute.
|
||||
if (!init_use_custom_pos) {
|
||||
|
|
@ -2709,7 +2653,7 @@ Error Main::setup(const char *execpath, int argc, char *argv[], bool p_second_ph
|
|||
}
|
||||
} else if (initial_position_type == Window::WINDOW_INITIAL_POSITION_CENTER_PRIMARY_SCREEN || initial_position_type == Window::WINDOW_INITIAL_POSITION_CENTER_MAIN_WINDOW_SCREEN) { // Center of Primary Screen.
|
||||
if (!init_use_custom_screen) {
|
||||
init_screen = DisplayServerEnums::SCREEN_PRIMARY;
|
||||
init_screen = DisplayServer::SCREEN_PRIMARY;
|
||||
init_use_custom_screen = true;
|
||||
}
|
||||
} else if (initial_position_type == Window::WINDOW_INITIAL_POSITION_CENTER_OTHER_SCREEN) { // Center of Other Screen.
|
||||
|
|
@ -2719,12 +2663,12 @@ Error Main::setup(const char *execpath, int argc, char *argv[], bool p_second_ph
|
|||
}
|
||||
} else if (initial_position_type == Window::WINDOW_INITIAL_POSITION_CENTER_SCREEN_WITH_MOUSE_FOCUS) { // Center of Screen With Mouse Pointer.
|
||||
if (!init_use_custom_screen) {
|
||||
init_screen = DisplayServerEnums::SCREEN_WITH_MOUSE_FOCUS;
|
||||
init_screen = DisplayServer::SCREEN_WITH_MOUSE_FOCUS;
|
||||
init_use_custom_screen = true;
|
||||
}
|
||||
} else if (initial_position_type == Window::WINDOW_INITIAL_POSITION_CENTER_SCREEN_WITH_KEYBOARD_FOCUS) { // Center of Screen With Keyboard Focus.
|
||||
if (!init_use_custom_screen) {
|
||||
init_screen = DisplayServerEnums::SCREEN_WITH_KEYBOARD_FOCUS;
|
||||
init_screen = DisplayServer::SCREEN_WITH_KEYBOARD_FOCUS;
|
||||
init_use_custom_screen = true;
|
||||
}
|
||||
}
|
||||
|
|
@ -2807,12 +2751,12 @@ Error Main::setup(const char *execpath, int argc, char *argv[], bool p_second_ph
|
|||
}
|
||||
|
||||
{
|
||||
window_orientation = DisplayServerEnums::ScreenOrientation(int(GLOBAL_DEF_BASIC("display/window/handheld/orientation", DisplayServerEnums::ScreenOrientation::SCREEN_LANDSCAPE)));
|
||||
window_orientation = DisplayServer::ScreenOrientation(int(GLOBAL_DEF_BASIC("display/window/handheld/orientation", DisplayServer::ScreenOrientation::SCREEN_LANDSCAPE)));
|
||||
}
|
||||
{
|
||||
window_vsync_mode = DisplayServerEnums::VSyncMode(int(GLOBAL_DEF_BASIC("display/window/vsync/vsync_mode", DisplayServerEnums::VSyncMode::VSYNC_ENABLED)));
|
||||
window_vsync_mode = DisplayServer::VSyncMode(int(GLOBAL_DEF_BASIC("display/window/vsync/vsync_mode", DisplayServer::VSyncMode::VSYNC_ENABLED)));
|
||||
if (disable_vsync) {
|
||||
window_vsync_mode = DisplayServerEnums::VSyncMode::VSYNC_DISABLED;
|
||||
window_vsync_mode = DisplayServer::VSyncMode::VSYNC_DISABLED;
|
||||
}
|
||||
}
|
||||
|
||||
|
|
@ -2853,8 +2797,6 @@ Error Main::setup(const char *execpath, int argc, char *argv[], bool p_second_ph
|
|||
GLOBAL_DEF_BASIC(PropertyInfo(Variant::INT, "xr/openxr/environment_blend_mode", PROPERTY_HINT_ENUM, "Opaque,Additive,Alpha"), "0");
|
||||
GLOBAL_DEF_BASIC(PropertyInfo(Variant::INT, "xr/openxr/foveation_level", PROPERTY_HINT_ENUM, "Off,Low,Medium,High"), "0");
|
||||
GLOBAL_DEF_BASIC("xr/openxr/foveation_dynamic", false);
|
||||
GLOBAL_DEF_BASIC("xr/openxr/foveation_eye_tracked", true);
|
||||
GLOBAL_DEF_BASIC("xr/openxr/foveation_with_subsampled_images", true);
|
||||
|
||||
GLOBAL_DEF_BASIC("xr/openxr/submit_depth_buffer", false);
|
||||
GLOBAL_DEF_BASIC("xr/openxr/startup_alert", true);
|
||||
|
|
@ -2879,7 +2821,6 @@ Error Main::setup(const char *execpath, int argc, char *argv[], bool p_second_ph
|
|||
GLOBAL_DEF_BASIC(PropertyInfo(Variant::INT, "xr/openxr/extensions/spatial_entity/april_tag_dict", PROPERTY_HINT_ENUM, "4x4H5,5x5H9,6x6H10,6x6H11"), "3");
|
||||
GLOBAL_DEF_RST_BASIC("xr/openxr/extensions/eye_gaze_interaction", false);
|
||||
GLOBAL_DEF_BASIC("xr/openxr/extensions/render_model", false);
|
||||
GLOBAL_DEF_BASIC("xr/openxr/extensions/user_presence", false);
|
||||
|
||||
// OpenXR Binding modifier settings
|
||||
GLOBAL_DEF_BASIC("xr/openxr/binding_modifiers/analog_threshold", false);
|
||||
|
|
@ -3057,9 +2998,9 @@ Error Main::setup2(bool p_show_boot_logo) {
|
|||
bool ac_found = false;
|
||||
|
||||
if (editor) {
|
||||
screen_property = "interface/editor/appearance/editor_screen";
|
||||
screen_property = "interface/editor/editor_screen";
|
||||
} else if (project_manager) {
|
||||
screen_property = "interface/editor/appearance/project_manager_screen";
|
||||
screen_property = "interface/editor/project_manager_screen";
|
||||
} else {
|
||||
// Skip.
|
||||
screen_found = true;
|
||||
|
|
@ -3092,13 +3033,13 @@ Error Main::setup2(bool p_show_boot_logo) {
|
|||
if (!ac_found && assign == "interface/accessibility/accessibility_support") {
|
||||
accessibility_mode_editor = value;
|
||||
ac_found = true;
|
||||
} else if (!init_expand_to_title_found && assign == "interface/editor/appearance/expand_to_title") {
|
||||
} else if (!init_expand_to_title_found && assign == "interface/editor/expand_to_title") {
|
||||
init_expand_to_title = value;
|
||||
init_expand_to_title_found = true;
|
||||
} else if (!init_display_scale_found && assign == "interface/editor/appearance/display_scale") {
|
||||
} else if (!init_display_scale_found && assign == "interface/editor/display_scale") {
|
||||
init_display_scale = value;
|
||||
init_display_scale_found = true;
|
||||
} else if (!init_custom_scale_found && assign == "interface/editor/appearance/custom_display_scale") {
|
||||
} else if (!init_custom_scale_found && assign == "interface/editor/custom_display_scale") {
|
||||
init_custom_scale = value;
|
||||
init_custom_scale_found = true;
|
||||
} else if (!prefer_wayland_found && assign == "run/platforms/linuxbsd/prefer_wayland") {
|
||||
|
|
@ -3109,7 +3050,7 @@ Error Main::setup2(bool p_show_boot_logo) {
|
|||
prefer_wayland = value;
|
||||
}
|
||||
prefer_wayland_found = true;
|
||||
} else if (!tablet_found && assign == "interface/editor/input/tablet_driver") {
|
||||
} else if (!tablet_found && assign == "interface/editor/tablet_driver") {
|
||||
tablet_driver_editor = value;
|
||||
tablet_found = true;
|
||||
}
|
||||
|
|
@ -3146,13 +3087,13 @@ Error Main::setup2(bool p_show_boot_logo) {
|
|||
String mode = config->get_value("EditorWindow", "mode", "maximized");
|
||||
window_size = config->get_value("EditorWindow", "size", window_size);
|
||||
if (mode == "windowed") {
|
||||
window_mode = DisplayServerEnums::WINDOW_MODE_WINDOWED;
|
||||
window_mode = DisplayServer::WINDOW_MODE_WINDOWED;
|
||||
init_windowed = true;
|
||||
} else if (mode == "fullscreen") {
|
||||
window_mode = DisplayServerEnums::WINDOW_MODE_FULLSCREEN;
|
||||
window_mode = DisplayServer::WINDOW_MODE_FULLSCREEN;
|
||||
init_fullscreen = true;
|
||||
} else {
|
||||
window_mode = DisplayServerEnums::WINDOW_MODE_MAXIMIZED;
|
||||
window_mode = DisplayServer::WINDOW_MODE_MAXIMIZED;
|
||||
init_maximized = true;
|
||||
}
|
||||
|
||||
|
|
@ -3164,7 +3105,7 @@ Error Main::setup2(bool p_show_boot_logo) {
|
|||
}
|
||||
|
||||
if (init_screen == EditorSettings::InitialScreen::INITIAL_SCREEN_AUTO) {
|
||||
init_screen = DisplayServerEnums::SCREEN_PRIMARY;
|
||||
init_screen = DisplayServer::SCREEN_PRIMARY;
|
||||
}
|
||||
|
||||
OS::get_singleton()->benchmark_end_measure("Startup", "Initialize Early Settings");
|
||||
|
|
@ -3253,93 +3194,46 @@ Error Main::setup2(bool p_show_boot_logo) {
|
|||
Color boot_bg_color = GLOBAL_DEF_BASIC("application/boot_splash/bg_color", boot_splash_bg_color);
|
||||
DisplayServer::set_early_window_clear_color_override(true, boot_bg_color);
|
||||
|
||||
DisplayServerEnums::Context context;
|
||||
DisplayServer::Context context;
|
||||
if (editor) {
|
||||
context = DisplayServerEnums::CONTEXT_EDITOR;
|
||||
context = DisplayServer::CONTEXT_EDITOR;
|
||||
} else if (project_manager) {
|
||||
context = DisplayServerEnums::CONTEXT_PROJECTMAN;
|
||||
context = DisplayServer::CONTEXT_PROJECTMAN;
|
||||
} else {
|
||||
context = DisplayServerEnums::CONTEXT_ENGINE;
|
||||
context = DisplayServer::CONTEXT_ENGINE;
|
||||
}
|
||||
|
||||
if (init_embed_parent_window_id) {
|
||||
// Reset flags and other settings to be sure it's borderless and windowed. The position and size should have been initialized correctly
|
||||
// from --position and --resolution parameters.
|
||||
window_mode = DisplayServerEnums::WINDOW_MODE_WINDOWED;
|
||||
window_flags = DisplayServerEnums::WINDOW_FLAG_BORDERLESS_BIT;
|
||||
window_mode = DisplayServer::WINDOW_MODE_WINDOWED;
|
||||
window_flags = DisplayServer::WINDOW_FLAG_BORDERLESS_BIT;
|
||||
if (bool(GLOBAL_GET("display/window/size/transparent"))) {
|
||||
window_flags |= DisplayServerEnums::WINDOW_FLAG_TRANSPARENT_BIT;
|
||||
window_flags |= DisplayServer::WINDOW_FLAG_TRANSPARENT_BIT;
|
||||
}
|
||||
}
|
||||
|
||||
#ifdef TOOLS_ENABLED
|
||||
if ((project_manager || editor) && init_expand_to_title) {
|
||||
window_flags |= DisplayServerEnums::WINDOW_FLAG_EXTEND_TO_TITLE_BIT;
|
||||
window_flags |= DisplayServer::WINDOW_FLAG_EXTEND_TO_TITLE_BIT;
|
||||
}
|
||||
#endif
|
||||
|
||||
if (!accessibility_mode_set) {
|
||||
#ifdef TOOLS_ENABLED
|
||||
if (editor || project_manager || cmdline_tool) {
|
||||
accessibility_mode = (AccessibilityServerEnums::AccessibilityMode)accessibility_mode_editor;
|
||||
accessibility_mode = (DisplayServer::AccessibilityMode)accessibility_mode_editor;
|
||||
} else {
|
||||
#else
|
||||
{
|
||||
#endif
|
||||
accessibility_mode = (AccessibilityServerEnums::AccessibilityMode)GLOBAL_GET("accessibility/general/accessibility_support").operator int64_t();
|
||||
}
|
||||
}
|
||||
if (accessibility_driver_name.is_empty()) {
|
||||
if (!editor && !project_manager) {
|
||||
accessibility_driver_name = GLOBAL_GET("accessibility/general/accessibility_driver");
|
||||
} else {
|
||||
accessibility_driver_name = "accesskit";
|
||||
}
|
||||
}
|
||||
if (display_driver == NULL_DISPLAY_DRIVER || display_driver == EMBEDDED_DISPLAY_DRIVER || accessibility_mode == AccessibilityServerEnums::AccessibilityMode::ACCESSIBILITY_DISABLED) {
|
||||
accessibility_driver_name = "dummy";
|
||||
}
|
||||
int accessibility_driver_idx = -1;
|
||||
|
||||
if (accessibility_driver_name.is_empty() || accessibility_driver_name == "default") {
|
||||
accessibility_driver_idx = 0;
|
||||
} else {
|
||||
for (int i = 0; i < AccessibilityServer::get_create_function_count(); i++) {
|
||||
String name = AccessibilityServer::get_create_function_name(i);
|
||||
if (accessibility_driver_name == name) {
|
||||
accessibility_driver_idx = i;
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
if (accessibility_driver_idx < 0) {
|
||||
// If the requested driver wasn't found, pick the first entry.
|
||||
// If all else failed it would be the headless server.
|
||||
accessibility_driver_idx = 0;
|
||||
accessibility_mode = (DisplayServer::AccessibilityMode)GLOBAL_GET("accessibility/general/accessibility_support").operator int64_t();
|
||||
}
|
||||
}
|
||||
DisplayServer::accessibility_set_mode(accessibility_mode);
|
||||
|
||||
// rendering_driver now held in static global String in main and initialized in setup()
|
||||
Error err;
|
||||
accessibility_server = AccessibilityServer::create(accessibility_driver_idx, err);
|
||||
if (err != OK || accessibility_server == nullptr) {
|
||||
String last_name = AccessibilityServer::get_create_function_name(accessibility_driver_idx);
|
||||
|
||||
for (int i = 0; i < AccessibilityServer::get_create_function_count(); i++) {
|
||||
if (i == accessibility_driver_idx) {
|
||||
continue; // Don't try the same twice.
|
||||
}
|
||||
String name = AccessibilityServer::get_create_function_name(i);
|
||||
WARN_VERBOSE(vformat("Accessibility driver %s failed, falling back to %s.", last_name, name));
|
||||
|
||||
accessibility_server = AccessibilityServer::create(i, err);
|
||||
if (err == OK && accessibility_server != nullptr) {
|
||||
break;
|
||||
}
|
||||
}
|
||||
}
|
||||
accessibility_server->set_mode(accessibility_mode);
|
||||
|
||||
String rendering_driver = OS::get_singleton()->get_current_rendering_driver_name();
|
||||
display_server = DisplayServer::create(display_driver_idx, rendering_driver, window_mode, window_vsync_mode, window_flags, window_position, window_size, init_screen, context, init_embed_parent_window_id, err);
|
||||
if (err != OK || display_server == nullptr) {
|
||||
String last_name = DisplayServer::get_create_function_name(display_driver_idx);
|
||||
|
|
@ -3421,20 +3315,20 @@ Error Main::setup2(bool p_show_boot_logo) {
|
|||
break;
|
||||
}
|
||||
if (!(force_res || use_custom_res)) {
|
||||
display_server->window_set_size(Size2(window_size) * ui_scale, DisplayServerEnums::MAIN_WINDOW_ID);
|
||||
display_server->window_set_size(Size2(window_size) * ui_scale, DisplayServer::MAIN_WINDOW_ID);
|
||||
}
|
||||
if (display_server->has_feature(DisplayServerEnums::FEATURE_SUBWINDOWS) && !display_server->has_feature(DisplayServerEnums::FEATURE_SELF_FITTING_WINDOWS)) {
|
||||
if (display_server->has_feature(DisplayServer::FEATURE_SUBWINDOWS) && !display_server->has_feature(DisplayServer::FEATURE_SELF_FITTING_WINDOWS)) {
|
||||
Size2 real_size = DisplayServer::get_singleton()->window_get_size();
|
||||
Rect2i scr_rect = display_server->screen_get_usable_rect(init_screen);
|
||||
display_server->window_set_position(scr_rect.position + (scr_rect.size - real_size) / 2, DisplayServerEnums::MAIN_WINDOW_ID);
|
||||
display_server->window_set_position(scr_rect.position + (scr_rect.size - real_size) / 2, DisplayServer::MAIN_WINDOW_ID);
|
||||
}
|
||||
}
|
||||
#endif
|
||||
if (display_server->has_feature(DisplayServerEnums::FEATURE_SUBWINDOWS)) {
|
||||
display_server->show_window(DisplayServerEnums::MAIN_WINDOW_ID);
|
||||
if (display_server->has_feature(DisplayServer::FEATURE_SUBWINDOWS)) {
|
||||
display_server->show_window(DisplayServer::MAIN_WINDOW_ID);
|
||||
}
|
||||
|
||||
if (display_server->has_feature(DisplayServerEnums::FEATURE_ORIENTATION)) {
|
||||
if (display_server->has_feature(DisplayServer::FEATURE_ORIENTATION)) {
|
||||
display_server->screen_set_orientation(window_orientation);
|
||||
}
|
||||
|
||||
|
|
@ -3453,7 +3347,7 @@ Error Main::setup2(bool p_show_boot_logo) {
|
|||
if (editor && init_windowed) {
|
||||
// We still need to check we are actually in windowed mode, because
|
||||
// certain platform might only support one fullscreen window.
|
||||
if (DisplayServer::get_singleton()->window_get_mode() == DisplayServerEnums::WINDOW_MODE_WINDOWED) {
|
||||
if (DisplayServer::get_singleton()->window_get_mode() == DisplayServer::WINDOW_MODE_WINDOWED) {
|
||||
Vector2i current_size = DisplayServer::get_singleton()->window_get_size();
|
||||
Vector2i current_pos = DisplayServer::get_singleton()->window_get_position();
|
||||
int screen = DisplayServer::get_singleton()->window_get_current_screen();
|
||||
|
|
@ -3474,16 +3368,16 @@ Error Main::setup2(bool p_show_boot_logo) {
|
|||
if (GLOBAL_GET("debug/settings/stdout/print_fps") || print_fps) {
|
||||
// Print requested V-Sync mode at startup to diagnose the printed FPS not going above the monitor refresh rate.
|
||||
switch (window_vsync_mode) {
|
||||
case DisplayServerEnums::VSyncMode::VSYNC_DISABLED:
|
||||
case DisplayServer::VSyncMode::VSYNC_DISABLED:
|
||||
print_line("Requested V-Sync mode: Disabled");
|
||||
break;
|
||||
case DisplayServerEnums::VSyncMode::VSYNC_ENABLED:
|
||||
case DisplayServer::VSyncMode::VSYNC_ENABLED:
|
||||
print_line("Requested V-Sync mode: Enabled - FPS will likely be capped to the monitor refresh rate.");
|
||||
break;
|
||||
case DisplayServerEnums::VSyncMode::VSYNC_ADAPTIVE:
|
||||
case DisplayServer::VSyncMode::VSYNC_ADAPTIVE:
|
||||
print_line("Requested V-Sync mode: Adaptive");
|
||||
break;
|
||||
case DisplayServerEnums::VSyncMode::VSYNC_MAILBOX:
|
||||
case DisplayServer::VSyncMode::VSYNC_MAILBOX:
|
||||
print_line("Requested V-Sync mode: Mailbox");
|
||||
break;
|
||||
}
|
||||
|
|
@ -3603,12 +3497,12 @@ Error Main::setup2(bool p_show_boot_logo) {
|
|||
if (init_windowed) {
|
||||
//do none..
|
||||
} else if (init_maximized) {
|
||||
DisplayServer::get_singleton()->window_set_mode(DisplayServerEnums::WINDOW_MODE_MAXIMIZED);
|
||||
DisplayServer::get_singleton()->window_set_mode(DisplayServer::WINDOW_MODE_MAXIMIZED);
|
||||
} else if (init_fullscreen) {
|
||||
DisplayServer::get_singleton()->window_set_mode(DisplayServerEnums::WINDOW_MODE_FULLSCREEN);
|
||||
DisplayServer::get_singleton()->window_set_mode(DisplayServer::WINDOW_MODE_FULLSCREEN);
|
||||
}
|
||||
if (init_always_on_top) {
|
||||
DisplayServer::get_singleton()->window_set_flag(DisplayServerEnums::WINDOW_FLAG_ALWAYS_ON_TOP, true);
|
||||
DisplayServer::get_singleton()->window_set_flag(DisplayServer::WINDOW_FLAG_ALWAYS_ON_TOP, true);
|
||||
}
|
||||
}
|
||||
|
||||
|
|
@ -3824,7 +3718,7 @@ Error Main::setup2(bool p_show_boot_logo) {
|
|||
GLOBAL_GET("display/mouse_cursor/custom_image"));
|
||||
if (cursor.is_valid()) {
|
||||
Vector2 hotspot = GLOBAL_GET("display/mouse_cursor/custom_image_hotspot");
|
||||
Input::get_singleton()->set_custom_mouse_cursor(cursor, Input::CursorShape::CURSOR_ARROW, hotspot);
|
||||
Input::get_singleton()->set_custom_mouse_cursor(cursor, Input::CURSOR_ARROW, hotspot);
|
||||
}
|
||||
}
|
||||
|
||||
|
|
@ -3906,7 +3800,7 @@ void Main::setup_boot_logo() {
|
|||
if (show_logo) { //boot logo!
|
||||
const bool boot_logo_image = GLOBAL_DEF_BASIC("application/boot_splash/show_image", true);
|
||||
|
||||
const RSE::SplashStretchMode boot_stretch_mode = GLOBAL_DEF_BASIC(PropertyInfo(Variant::INT, "application/boot_splash/stretch_mode", PROPERTY_HINT_ENUM, "Disabled,Keep,Keep Width,Keep Height,Cover,Ignore"), 1);
|
||||
const RenderingServer::SplashStretchMode boot_stretch_mode = GLOBAL_DEF_BASIC(PropertyInfo(Variant::INT, "application/boot_splash/stretch_mode", PROPERTY_HINT_ENUM, "Disabled,Keep,Keep Width,Keep Height,Cover,Ignore"), 1);
|
||||
const bool boot_logo_filter = GLOBAL_DEF_BASIC("application/boot_splash/use_filter", true);
|
||||
String boot_logo_path = GLOBAL_DEF_BASIC(PropertyInfo(Variant::STRING, "application/boot_splash/image", PROPERTY_HINT_FILE, "*.png"), String());
|
||||
|
||||
|
|
@ -3960,12 +3854,12 @@ void Main::setup_boot_logo() {
|
|||
MAIN_PRINT("Main: ClearColor");
|
||||
RenderingServer::get_singleton()->set_default_clear_color(boot_bg_color);
|
||||
MAIN_PRINT("Main: Image");
|
||||
RenderingServer::get_singleton()->set_boot_image_with_stretch(splash, boot_bg_color, RSE::SPLASH_STRETCH_MODE_DISABLED);
|
||||
RenderingServer::get_singleton()->set_boot_image_with_stretch(splash, boot_bg_color, RenderingServer::SPLASH_STRETCH_MODE_DISABLED);
|
||||
#endif
|
||||
}
|
||||
|
||||
#if defined(TOOLS_ENABLED) && defined(MACOS_ENABLED)
|
||||
if (DisplayServer::get_singleton()->has_feature(DisplayServerEnums::FEATURE_ICON) && OS::get_singleton()->get_bundle_icon_path().is_empty()) {
|
||||
if (DisplayServer::get_singleton()->has_feature(DisplayServer::FEATURE_ICON) && OS::get_singleton()->get_bundle_icon_path().is_empty()) {
|
||||
Ref<Image> icon = memnew(Image(app_icon_png));
|
||||
DisplayServer::get_singleton()->set_icon(icon);
|
||||
}
|
||||
|
|
@ -3975,6 +3869,10 @@ void Main::setup_boot_logo() {
|
|||
GLOBAL_GET("rendering/environment/defaults/default_clear_color"));
|
||||
}
|
||||
|
||||
String Main::get_rendering_driver_name() {
|
||||
return rendering_driver;
|
||||
}
|
||||
|
||||
String Main::get_locale_override() {
|
||||
return locale;
|
||||
}
|
||||
|
|
@ -4462,7 +4360,7 @@ int Main::start() {
|
|||
|
||||
bool embed_subwindows = GLOBAL_GET("display/window/subwindows/embed_subwindows");
|
||||
|
||||
if (single_window || (!project_manager && !editor && embed_subwindows) || !DisplayServer::get_singleton()->has_feature(DisplayServerEnums::FEATURE_SUBWINDOWS)) {
|
||||
if (single_window || (!project_manager && !editor && embed_subwindows) || !DisplayServer::get_singleton()->has_feature(DisplayServer::Feature::FEATURE_SUBWINDOWS)) {
|
||||
sml->get_root()->set_embedding_subwindows(true);
|
||||
}
|
||||
|
||||
|
|
@ -4473,7 +4371,7 @@ int Main::start() {
|
|||
if (!game_path.is_empty() || !script.is_empty()) {
|
||||
//autoload
|
||||
OS::get_singleton()->benchmark_begin_measure("Startup", "Load Autoloads");
|
||||
HashMap<StringName, ProjectSettings::AutoloadInfo> autoloads(ProjectSettings::get_singleton()->get_autoload_list());
|
||||
HashMap<StringName, ProjectSettings::AutoloadInfo> autoloads = ProjectSettings::get_singleton()->get_autoload_list();
|
||||
|
||||
//first pass, add the constants so they exist before any script is loaded
|
||||
for (const KeyValue<StringName, ProjectSettings::AutoloadInfo> &E : autoloads) {
|
||||
|
|
@ -4667,12 +4565,12 @@ int Main::start() {
|
|||
|
||||
#ifdef TOOLS_ENABLED
|
||||
if (editor) {
|
||||
bool editor_embed_subwindows = EDITOR_GET("interface/editor/display/single_window_mode");
|
||||
bool editor_embed_subwindows = EDITOR_GET("interface/editor/single_window_mode");
|
||||
|
||||
if (editor_embed_subwindows) {
|
||||
sml->get_root()->set_embedding_subwindows(true);
|
||||
}
|
||||
restore_editor_window_layout = EDITOR_GET("interface/editor/appearance/editor_screen").operator int() == EditorSettings::InitialScreen::INITIAL_SCREEN_AUTO;
|
||||
restore_editor_window_layout = EDITOR_GET("interface/editor/editor_screen").operator int() == EditorSettings::InitialScreen::INITIAL_SCREEN_AUTO;
|
||||
}
|
||||
#endif
|
||||
|
||||
|
|
@ -4749,7 +4647,7 @@ int Main::start() {
|
|||
}
|
||||
#endif
|
||||
String mac_icon_path = GLOBAL_GET("application/config/macos_native_icon");
|
||||
if (DisplayServer::get_singleton()->has_feature(DisplayServerEnums::FEATURE_NATIVE_ICON) && !mac_icon_path.is_empty() && !has_icon) {
|
||||
if (DisplayServer::get_singleton()->has_feature(DisplayServer::FEATURE_NATIVE_ICON) && !mac_icon_path.is_empty() && !has_icon) {
|
||||
DisplayServer::get_singleton()->set_native_icon(mac_icon_path);
|
||||
has_icon = true;
|
||||
}
|
||||
|
|
@ -4757,14 +4655,14 @@ int Main::start() {
|
|||
|
||||
#ifdef WINDOWS_ENABLED
|
||||
String win_icon_path = GLOBAL_GET("application/config/windows_native_icon");
|
||||
if (DisplayServer::get_singleton()->has_feature(DisplayServerEnums::FEATURE_NATIVE_ICON) && !win_icon_path.is_empty()) {
|
||||
if (DisplayServer::get_singleton()->has_feature(DisplayServer::FEATURE_NATIVE_ICON) && !win_icon_path.is_empty()) {
|
||||
DisplayServer::get_singleton()->set_native_icon(win_icon_path);
|
||||
has_icon = true;
|
||||
}
|
||||
#endif
|
||||
|
||||
String icon_path = GLOBAL_GET("application/config/icon");
|
||||
if (DisplayServer::get_singleton()->has_feature(DisplayServerEnums::FEATURE_ICON) && !icon_path.is_empty() && !has_icon) {
|
||||
if (DisplayServer::get_singleton()->has_feature(DisplayServer::FEATURE_ICON) && !icon_path.is_empty() && !has_icon) {
|
||||
Ref<Image> icon;
|
||||
icon.instantiate();
|
||||
if (ImageLoader::load_image(icon_path, icon) == OK) {
|
||||
|
|
@ -4807,7 +4705,7 @@ int Main::start() {
|
|||
#endif
|
||||
}
|
||||
|
||||
if (DisplayServer::get_singleton()->has_feature(DisplayServerEnums::FEATURE_ICON) && !has_icon && OS::get_singleton()->get_bundle_icon_path().is_empty()) {
|
||||
if (DisplayServer::get_singleton()->has_feature(DisplayServer::FEATURE_ICON) && !has_icon && OS::get_singleton()->get_bundle_icon_path().is_empty()) {
|
||||
Ref<Image> icon = memnew(Image(app_icon_png));
|
||||
DisplayServer::get_singleton()->set_icon(icon);
|
||||
}
|
||||
|
|
@ -5195,9 +5093,6 @@ void Main::cleanup(bool p_force) {
|
|||
ERR_FAIL_COND(!_start_success);
|
||||
}
|
||||
|
||||
// Printing in the usual way can become problematic during/after cleanup.
|
||||
CoreGlobals::print_ready = false;
|
||||
|
||||
#ifdef DEBUG_ENABLED
|
||||
if (input) {
|
||||
input->flush_frame_parsed_events();
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue