diff options
author | Michael Alexsander <michaelalexsander@protonmail.com> | 2019-10-04 10:26:02 -0300 |
---|---|---|
committer | Michael Alexsander <michaelalexsander@protonmail.com> | 2019-10-04 10:27:11 -0300 |
commit | d12a8940cb249e4cfa8d3850ca2c250109cde396 (patch) | |
tree | a3f78ac5080168b600a500d2a3b2dd2289e276b0 | |
parent | b177051521631f77092dc2513873afbd7015d4bb (diff) |
Make possible to use just one "size/test_*" value in the settings
-rw-r--r-- | main/main.cpp | 7 |
1 files changed, 5 insertions, 2 deletions
diff --git a/main/main.cpp b/main/main.cpp index 6df02af3a5..42c90fc027 100644 --- a/main/main.cpp +++ b/main/main.cpp @@ -982,10 +982,13 @@ Error Main::setup(const char *execpath, int argc, char *argv[], bool p_second_ph video_mode.height = GLOBAL_GET("display/window/size/height"); if (globals->has_setting("display/window/size/test_width") && globals->has_setting("display/window/size/test_height")) { + int tw = globals->get("display/window/size/test_width"); - int th = globals->get("display/window/size/test_height"); - if (tw > 0 && th > 0) { + if (tw > 0) { video_mode.width = tw; + } + int th = globals->get("display/window/size/test_height"); + if (th > 0) { video_mode.height = th; } } |