diff options
author | RĂ©mi Verschelde <rverschelde@gmail.com> | 2017-08-11 15:55:22 +0200 |
---|---|---|
committer | GitHub <noreply@github.com> | 2017-08-11 15:55:22 +0200 |
commit | 23f6d3fa69935c90c6cdcee342ae99d226e9b4ab (patch) | |
tree | 020f9c3bd654d4ac76f61d50d59ad33217b3917d /main | |
parent | ff2cb35b90f5661d1bb5fb00fa657a9539449be0 (diff) | |
parent | b2ca50054504e5a8db6a6940af2da99b49c95486 (diff) |
Merge pull request #10198 from jjay/f/stretch_aspect_expand
Add "expand" option for stretch aspect, no more black bars
Diffstat (limited to 'main')
-rw-r--r-- | main/main.cpp | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/main/main.cpp b/main/main.cpp index 9376d83204..f23da57185 100644 --- a/main/main.cpp +++ b/main/main.cpp @@ -1275,6 +1275,8 @@ bool Main::start() { sml_aspect = SceneTree::STRETCH_ASPECT_KEEP_WIDTH; else if (stretch_aspect == "keep_height") sml_aspect = SceneTree::STRETCH_ASPECT_KEEP_HEIGHT; + else if (stretch_aspect == "expand") + sml_aspect = SceneTree::STRETCH_ASPECT_EXPAND; sml->set_screen_stretch(sml_sm, sml_aspect, stretch_size, stretch_shrink); @@ -1302,7 +1304,7 @@ bool Main::start() { GLOBAL_DEF("display/window/stretch/mode", "disabled"); 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")); + 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,expand")); 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)); |