Merge pull request #32549 from YeldhamDev/test_size_single_override

Make possible to use just one "size/test_*" value in the settings
This commit is contained in:
Rémi Verschelde 2019-10-04 19:31:58 +02:00 committed by GitHub
commit 4a863eeec7
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -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;
}
}