Ignore warnings for non existing options in previous level of ini files (parent for example) (no whatsnew)

This commit is contained in:
Miodrag Milanovic 2011-01-21 09:17:35 +00:00
parent 1d78049857
commit c25886cea3
3 changed files with 4 additions and 4 deletions

View File

@ -588,7 +588,7 @@ static int parse_ini_file(core_options *options, const char *name, int priority)
/* parse the file and close it */ /* parse the file and close it */
mame_printf_verbose("Parsing %s.ini\n", name); mame_printf_verbose("Parsing %s.ini\n", name);
options_parse_ini_file(options, mame_core_file(file), priority); options_parse_ini_file(options, mame_core_file(file), priority, OPTION_PRIORITY_DRIVER_INI);
mame_fclose(file); mame_fclose(file);
return TRUE; return TRUE;
} }

View File

@ -544,7 +544,7 @@ int options_force_option_callback(core_options *opts, const char *optionname, co
of entries in an INI file of entries in an INI file
-------------------------------------------------*/ -------------------------------------------------*/
int options_parse_ini_file(core_options *opts, core_file *inifile, int priority) int options_parse_ini_file(core_options *opts, core_file *inifile, int priority, int ignoreprio)
{ {
char buffer[4096]; char buffer[4096];
@ -594,7 +594,7 @@ int options_parse_ini_file(core_options *opts, core_file *inifile, int priority)
data = find_entry_data(opts, optionname, FALSE); data = find_entry_data(opts, optionname, FALSE);
if (data == NULL) if (data == NULL)
{ {
message(opts, OPTMSG_WARNING, "Warning: unknown option in INI: %s\n", optionname); if (priority >= ignoreprio) message(opts, OPTMSG_WARNING, "Warning: unknown option in INI: %s\n", optionname);
continue; continue;
} }
if ((data->flags & (OPTION_DEPRECATED | OPTION_INTERNAL)) != 0) if ((data->flags & (OPTION_DEPRECATED | OPTION_INTERNAL)) != 0)

View File

@ -175,7 +175,7 @@ int options_parse_command_line(core_options *opts, int argc, char **argv, int pr
int options_force_option_callback(core_options *opts, const char *optionname, const char *newval, int priority); int options_force_option_callback(core_options *opts, const char *optionname, const char *newval, int priority);
/* parse option data from an INI file */ /* parse option data from an INI file */
int options_parse_ini_file(core_options *opts, core_file *inifile, int priority); int options_parse_ini_file(core_options *opts, core_file *inifile, int priority, int ignoreprio);