comparison blastem.c @ 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 7f84090ab1cd
children f0631c85a90b
comparison
equal deleted inserted replaced
432:18cde14e8c10 433:ed4d0017c041
1951 } else if (height < 0) { 1951 } else if (height < 0) {
1952 height = atoi(argv[i]); 1952 height = atoi(argv[i]);
1953 } 1953 }
1954 } 1954 }
1955 update_title(); 1955 update_title();
1956 width = width < 320 ? 640 : width; 1956 int def_width = 0;
1957 char *config_width = tern_find_ptr(config, "videowidth");
1958 if (config_width) {
1959 def_width = atoi(config_width);
1960 }
1961 if (!def_width) {
1962 def_width = 640;
1963 }
1964 width = width < 320 ? def_width : width;
1957 height = height < 240 ? (width/320) * 240 : height; 1965 height = height < 240 ? (width/320) * 240 : height;
1958 uint32_t fps = 60; 1966 uint32_t fps = 60;
1959 if (version_reg & 0x40) { 1967 if (version_reg & 0x40) {
1960 mclks_per_frame = MCLKS_LINE * LINES_PAL; 1968 mclks_per_frame = MCLKS_LINE * LINES_PAL;
1961 fps = 50; 1969 fps = 50;