diff options
author | RĂ©mi Verschelde <rverschelde@gmail.com> | 2019-10-04 19:31:58 +0200 |
---|---|---|
committer | GitHub <noreply@github.com> | 2019-10-04 19:31:58 +0200 |
commit | 4a863eeec78f66528e0a058c552a425f8bc68ad0 (patch) | |
tree | 7c1cd30514fa38a1f9259f567717577ebbb429f0 | |
parent | 99df569b40646979a917637c1efbf1cd3e8c7dcd (diff) | |
parent | d12a8940cb249e4cfa8d3850ca2c250109cde396 (diff) |
Merge pull request #32549 from YeldhamDev/test_size_single_override
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; } } |