From 621cb8c52f0eb8e70fc8230eec1cc516955e8b78 Mon Sep 17 00:00:00 2001 From: kobewi Date: Thu, 12 May 2022 16:38:59 +0200 Subject: [PATCH] Move Display settings higher in the list (cherry picked from commit 739242dd04d16f85d542bcf9a29aa44402410481) --- core/project_settings.cpp | 14 ++++++++++++++ main/main.cpp | 13 ------------- 2 files changed, 14 insertions(+), 13 deletions(-) diff --git a/core/project_settings.cpp b/core/project_settings.cpp index 13c5a605f0b..43ef3291194 100644 --- a/core/project_settings.cpp +++ b/core/project_settings.cpp @@ -1069,6 +1069,20 @@ ProjectSettings::ProjectSettings() { GLOBAL_DEF("application/config/use_custom_user_dir", false); GLOBAL_DEF("application/config/custom_user_dir_name", ""); GLOBAL_DEF("application/config/project_settings_override", ""); + + GLOBAL_DEF("display/window/size/width", 1024); + ProjectSettings::get_singleton()->set_custom_property_info("display/window/size/width", PropertyInfo(Variant::INT, "display/window/size/width", PROPERTY_HINT_RANGE, "0,7680,1,or_greater")); // 8K resolution + GLOBAL_DEF("display/window/size/height", 600); + ProjectSettings::get_singleton()->set_custom_property_info("display/window/size/height", PropertyInfo(Variant::INT, "display/window/size/height", PROPERTY_HINT_RANGE, "0,4320,1,or_greater")); // 8K resolution + GLOBAL_DEF("display/window/size/resizable", true); + GLOBAL_DEF("display/window/size/borderless", false); + GLOBAL_DEF("display/window/size/fullscreen", false); + GLOBAL_DEF("display/window/size/always_on_top", false); + GLOBAL_DEF("display/window/size/test_width", 0); + ProjectSettings::get_singleton()->set_custom_property_info("display/window/size/test_width", PropertyInfo(Variant::INT, "display/window/size/test_width", PROPERTY_HINT_RANGE, "0,7680,1,or_greater")); // 8K resolution + GLOBAL_DEF("display/window/size/test_height", 0); + ProjectSettings::get_singleton()->set_custom_property_info("display/window/size/test_height", PropertyInfo(Variant::INT, "display/window/size/test_height", PROPERTY_HINT_RANGE, "0,4320,1,or_greater")); // 8K resolution + GLOBAL_DEF("audio/default_bus_layout", "res://default_bus_layout.tres"); custom_prop_info["audio/default_bus_layout"] = PropertyInfo(Variant::STRING, "audio/default_bus_layout", PROPERTY_HINT_FILE, "*.tres"); diff --git a/main/main.cpp b/main/main.cpp index 3d4ef1f3240..42061a62733 100644 --- a/main/main.cpp +++ b/main/main.cpp @@ -1082,19 +1082,6 @@ Error Main::setup(const char *execpath, int argc, char *argv[], bool p_second_ph // Assigning here, to be sure that it appears in docs GLOBAL_DEF("rendering/2d/options/use_nvidia_rect_flicker_workaround", false); - GLOBAL_DEF("display/window/size/width", 1024); - ProjectSettings::get_singleton()->set_custom_property_info("display/window/size/width", PropertyInfo(Variant::INT, "display/window/size/width", PROPERTY_HINT_RANGE, "0,7680,1,or_greater")); // 8K resolution - GLOBAL_DEF("display/window/size/height", 600); - ProjectSettings::get_singleton()->set_custom_property_info("display/window/size/height", PropertyInfo(Variant::INT, "display/window/size/height", PROPERTY_HINT_RANGE, "0,4320,1,or_greater")); // 8K resolution - GLOBAL_DEF("display/window/size/resizable", true); - GLOBAL_DEF("display/window/size/borderless", false); - GLOBAL_DEF("display/window/size/fullscreen", false); - GLOBAL_DEF("display/window/size/always_on_top", false); - GLOBAL_DEF("display/window/size/test_width", 0); - ProjectSettings::get_singleton()->set_custom_property_info("display/window/size/test_width", PropertyInfo(Variant::INT, "display/window/size/test_width", PROPERTY_HINT_RANGE, "0,7680,1,or_greater")); // 8K resolution - GLOBAL_DEF("display/window/size/test_height", 0); - ProjectSettings::get_singleton()->set_custom_property_info("display/window/size/test_height", PropertyInfo(Variant::INT, "display/window/size/test_height", PROPERTY_HINT_RANGE, "0,4320,1,or_greater")); // 8K resolution - if (use_custom_res) { if (!force_res) { video_mode.width = GLOBAL_GET("display/window/size/width");