Browse Source

Make possible to use just one "size/test_*" value in the settings

Michael Alexsander 6 years ago
parent
commit
d12a8940cb
1 changed files with 5 additions and 2 deletions
  1. 5 2
      main/main.cpp

+ 5 - 2
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");
 			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")) {
 			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 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;
 					video_mode.width = tw;
+				}
+				int th = globals->get("display/window/size/test_height");
+				if (th > 0) {
 					video_mode.height = th;
 					video_mode.height = th;
 				}
 				}
 			}
 			}