Previous 15994 Revisions Next

r10118 Friday 21st January, 2011 at 09:16:32 UTC by Miodrag Milanović
Ignore warnings for non existing options in previous level of ini files (parent for example)
[src/emu]mame.c
[src/lib/util]options.c options.h
[src/osd/winui]mui_opts.c

src/osd/winui/mui_opts.c
r10117r10118
22732273   filerr = core_fopen(filename, OPEN_FLAG_READ, &file);
22742274   if (filerr == FILERR_NONE)
22752275   {
2276      options_parse_ini_file(opts, file, OPTION_PRIORITY_CMDLINE);
2276      options_parse_ini_file(opts, file, OPTION_PRIORITY_CMDLINE, OPTION_PRIORITY_CMDLINE);
22772277      core_fclose(file);
22782278   }
22792279   return filerr;
src/emu/mame.c
r10117r10118
588588
589589   /* parse the file and close it */
590590   mame_printf_verbose("Parsing %s.ini\n", name);
591   options_parse_ini_file(options, mame_core_file(file), priority);
591   options_parse_ini_file(options, mame_core_file(file), priority, OPTION_PRIORITY_DRIVER_INI);
592592   mame_fclose(file);
593593   return TRUE;
594594}
src/lib/util/options.h
r10117r10118
175175int options_force_option_callback(core_options *opts, const char *optionname, const char *newval, int priority);
176176
177177/* parse option data from an INI file */
178int options_parse_ini_file(core_options *opts, core_file *inifile, int priority);
178int options_parse_ini_file(core_options *opts, core_file *inifile, int priority, int ignoreprio);
179179
180180
181181
src/lib/util/options.c
r10117r10118
544544    of entries in an INI file
545545-------------------------------------------------*/
546546
547int options_parse_ini_file(core_options *opts, core_file *inifile, int priority)
547int options_parse_ini_file(core_options *opts, core_file *inifile, int priority, int ignoreprio)
548548{
549549   char buffer[4096];
550550
r10117r10118
594594      data = find_entry_data(opts, optionname, FALSE);
595595      if (data == NULL)
596596      {
597         message(opts, OPTMSG_WARNING, "Warning: unknown option in INI: %s\n", optionname);
597         if (priority >= ignoreprio) message(opts, OPTMSG_WARNING, "Warning: unknown option in INI: %s\n", optionname);
598598         continue;
599599      }
600600      if ((data->flags & (OPTION_DEPRECATED | OPTION_INTERNAL)) != 0)

Previous 15994 Revisions Next


© 1998-2018 The MESS Team