From 943feeee100b9fac0a46beb1a758e3d845717aa7 Mon Sep 17 00:00:00 2001 From: groud Date: Tue, 2 Oct 2018 14:51:24 +0200 Subject: [PATCH] Avoid the window size to go below 0 --- main/main.cpp | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/main/main.cpp b/main/main.cpp index 3eb0b7f354d..c50d684f4ac 100644 --- a/main/main.cpp +++ b/main/main.cpp @@ -871,13 +871,17 @@ Error Main::setup(const char *execpath, int argc, char *argv[], bool p_second_ph ProjectSettings::get_singleton()->set_custom_property_info("rendering/quality/driver/driver_fallback", PropertyInfo(Variant::STRING, "rendering/quality/driver/driver_fallback", PROPERTY_HINT_ENUM, "Best,Never")); 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,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,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,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,or_greater")); // 8K resolution if (use_custom_res) {