diff options
Diffstat (limited to 'main/main.cpp')
-rw-r--r-- | main/main.cpp | 13 |
1 files changed, 9 insertions, 4 deletions
diff --git a/main/main.cpp b/main/main.cpp index 98c8b59ebc..8960d85c45 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)); } @@ -1694,14 +1697,16 @@ void Main::cleanup() { OS::get_singleton()->_execpath = ""; OS::get_singleton()->_local_clipboard = ""; - if (audio_server) { - memdelete(audio_server); - } + ScriptServer::finish_languages(); #ifdef TOOLS_ENABLED EditorNode::unregister_editor_types(); #endif + if (audio_server) { + memdelete(audio_server); + } + unregister_driver_types(); unregister_module_types(); unregister_scene_types(); |