diff options
author | RĂ©mi Verschelde <rverschelde@gmail.com> | 2018-10-02 18:42:56 +0200 |
---|---|---|
committer | GitHub <noreply@github.com> | 2018-10-02 18:42:56 +0200 |
commit | ff1794a7a080e30cff4dd1efb99289ab1f4f267d (patch) | |
tree | ed7b5c407fcf62de8599e9cd9cf32fe85bfabaf0 /main | |
parent | 470602699d6927c2f6729829034a090f96720923 (diff) | |
parent | 943feeee100b9fac0a46beb1a758e3d845717aa7 (diff) |
Merge pull request #22621 from groud/limit_window_size
Avoid the window size to go below 0
Diffstat (limited to 'main')
-rw-r--r-- | main/main.cpp | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/main/main.cpp b/main/main.cpp index 3eb0b7f354..c50d684f4a 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) { |