diff options
author | Juan Linietsky <reduzio@gmail.com> | 2017-07-22 14:07:38 -0300 |
---|---|---|
committer | Juan Linietsky <reduzio@gmail.com> | 2017-07-22 14:08:17 -0300 |
commit | 772485cdb3a0b0003da6e174157680559fa2a59e (patch) | |
tree | 475df1a1650d526781758c7d7aad7968bb7c9bd7 /main | |
parent | 492999a33b389ac6ddfa0cb80c78409bd2d54e1c (diff) |
Several changes to better run in mobile.
Diffstat (limited to 'main')
-rw-r--r-- | main/main.cpp | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/main/main.cpp b/main/main.cpp index 98c8b59ebc..5fef3658b9 100644 --- a/main/main.cpp +++ b/main/main.cpp @@ -1260,6 +1260,7 @@ bool Main::start() { String stretch_mode = GLOBAL_DEF("display/window/stretch/mode", "disabled"); String stretch_aspect = GLOBAL_DEF("display/window/stretch/aspect", "ignore"); Size2i stretch_size = Size2(GLOBAL_DEF("display/window/size/width", 0), GLOBAL_DEF("display/window/size/height", 0)); + int stretch_shrink = GLOBAL_DEF("display/window/stretch/shrink", 1); SceneTree::StretchMode sml_sm = SceneTree::STRETCH_MODE_DISABLED; if (stretch_mode == "2d") @@ -1275,7 +1276,7 @@ bool Main::start() { else if (stretch_aspect == "keep_height") sml_aspect = SceneTree::STRETCH_ASPECT_KEEP_HEIGHT; - sml->set_screen_stretch(sml_sm, sml_aspect, stretch_size); + sml->set_screen_stretch(sml_sm, sml_aspect, stretch_size, stretch_shrink); sml->set_auto_accept_quit(GLOBAL_DEF("application/config/auto_accept_quit", true)); sml->set_quit_on_go_back(GLOBAL_DEF("application/config/quit_on_go_back", true)); @@ -1302,6 +1303,8 @@ bool Main::start() { ProjectSettings::get_singleton()->set_custom_property_info("display/window/stretch/mode", PropertyInfo(Variant::STRING, "display/window/stretch/mode", PROPERTY_HINT_ENUM, "disabled,2d,viewport")); GLOBAL_DEF("display/window/stretch/aspect", "ignore"); ProjectSettings::get_singleton()->set_custom_property_info("display/window/stretch/aspect", PropertyInfo(Variant::STRING, "display/window/stretch/aspect", PROPERTY_HINT_ENUM, "ignore,keep,keep_width,keep_height")); + GLOBAL_DEF("display/window/stretch/shrink", 1); + ProjectSettings::get_singleton()->set_custom_property_info("display/window/stretch/shrink", PropertyInfo(Variant::STRING, "display/window/stretch/shrink", PROPERTY_HINT_RANGE, "1,8,1")); sml->set_auto_accept_quit(GLOBAL_DEF("application/config/auto_accept_quit", true)); sml->set_quit_on_go_back(GLOBAL_DEF("application/config/quit_on_go_back", true)); } |