changeset 433:ed4d0017c041

Read default render width from config file
author Mike Pavone <pavone@retrodev.com>
date Wed, 10 Jul 2013 23:52:09 -0700
parents 18cde14e8c10
children f0631c85a90b
files blastem.c
diffstat 1 files changed, 9 insertions(+), 1 deletions(-) [+]
line wrap: on
line diff
--- a/blastem.c	Wed Jul 10 23:47:48 2013 -0700
+++ b/blastem.c	Wed Jul 10 23:52:09 2013 -0700
@@ -1953,7 +1953,15 @@
 		}
 	}
 	update_title();
-	width = width < 320 ? 640 : width;
+	int def_width = 0;
+	char *config_width = tern_find_ptr(config, "videowidth");
+	if (config_width) {
+		def_width = atoi(config_width);
+	}
+	if (!def_width) {
+		def_width = 640;
+	}
+	width = width < 320 ? def_width : width;
 	height = height < 240 ? (width/320) * 240 : height;
 	uint32_t fps = 60;
 	if (version_reg & 0x40) {