Perform validation after reading ini file and check system name, fixes issues with ramsize option (no whatsnew)

This commit is contained in:
Miodrag Milanovic 2012-06-03 12:01:22 +00:00
parent 41cea9aac7
commit db64d8b966
2 changed files with 8 additions and 8 deletions

View File

@ -401,7 +401,7 @@ bool emu_options::parse_command_line(int argc, char *argv[], astring &error_stri
// remove any existing device options // remove any existing device options
remove_device_options(); remove_device_options();
result = parse_slot_devices(argc, argv, error_string, NULL, NULL); result = parse_slot_devices(argc, argv, error_string, NULL, NULL);
if (exists(OPTION_RAMSIZE)) if (exists(OPTION_RAMSIZE) && old_system_name.len()!=0)
set_value(OPTION_RAMSIZE, "", OPTION_PRIORITY_CMDLINE, error_string); set_value(OPTION_RAMSIZE, "", OPTION_PRIORITY_CMDLINE, error_string);
} }
return result; return result;

View File

@ -159,13 +159,6 @@ int mame_execute(emu_options &options, osd_interface &osd)
started_empty = true; started_empty = true;
} }
// otherwise, perform validity checks before anything else
else
{
validity_checker valid(options);
valid.check_shared_source(*system);
}
firstgame = false; firstgame = false;
// parse any INI files as the first thing // parse any INI files as the first thing
@ -175,6 +168,13 @@ int mame_execute(emu_options &options, osd_interface &osd)
astring errors; astring errors;
options.parse_standard_inis(errors); options.parse_standard_inis(errors);
} }
// otherwise, perform validity checks before anything else
if (system != NULL)
{
validity_checker valid(options);
valid.check_shared_source(*system);
}
// create the machine configuration // create the machine configuration
machine_config config(*system, options); machine_config config(*system, options);