summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMike Pavone <pavone@retrodev.com>2013-07-10 23:52:09 -0700
committerMike Pavone <pavone@retrodev.com>2013-07-10 23:52:09 -0700
commit99c967da1e83f5073c7134cbe9853bbb33fb9243 (patch)
tree9ef825385fd999e384cb8b39986466093c0e3bfd
parent931a3998b096b27d881f4e4576759ef0e0bff4e1 (diff)
Read default render width from config file
-rw-r--r--blastem.c10
1 files changed, 9 insertions, 1 deletions
diff --git a/blastem.c b/blastem.c
index 2a02b31..1b93263 100644
--- a/blastem.c
+++ b/blastem.c
@@ -1953,7 +1953,15 @@ int main(int argc, char ** argv)
}
}
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) {