| 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 |
| r10117 | r10118 | |
|---|---|---|
| 2273 | 2273 | filerr = core_fopen(filename, OPEN_FLAG_READ, &file); |
| 2274 | 2274 | if (filerr == FILERR_NONE) |
| 2275 | 2275 | { |
| 2276 | options_parse_ini_file(opts, file, OPTION_PRIORITY_CMDLINE); | |
| 2276 | options_parse_ini_file(opts, file, OPTION_PRIORITY_CMDLINE, OPTION_PRIORITY_CMDLINE); | |
| 2277 | 2277 | core_fclose(file); |
| 2278 | 2278 | } |
| 2279 | 2279 | return filerr; |
| r10117 | r10118 | |
|---|---|---|
| 588 | 588 | |
| 589 | 589 | /* parse the file and close it */ |
| 590 | 590 | 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); | |
| 592 | 592 | mame_fclose(file); |
| 593 | 593 | return TRUE; |
| 594 | 594 | } |
| r10117 | r10118 | |
|---|---|---|
| 175 | 175 | int options_force_option_callback(core_options *opts, const char *optionname, const char *newval, int priority); |
| 176 | 176 | |
| 177 | 177 | /* parse option data from an INI file */ |
| 178 | int options_parse_ini_file(core_options *opts, core_file *inifile, int priority); | |
| 178 | int options_parse_ini_file(core_options *opts, core_file *inifile, int priority, int ignoreprio); | |
| 179 | 179 | |
| 180 | 180 | |
| 181 | 181 |
| r10117 | r10118 | |
|---|---|---|
| 544 | 544 | of entries in an INI file |
| 545 | 545 | -------------------------------------------------*/ |
| 546 | 546 | |
| 547 | int options_parse_ini_file(core_options *opts, core_file *inifile, int priority) | |
| 547 | int options_parse_ini_file(core_options *opts, core_file *inifile, int priority, int ignoreprio) | |
| 548 | 548 | { |
| 549 | 549 | char buffer[4096]; |
| 550 | 550 | |
| r10117 | r10118 | |
| 594 | 594 | data = find_entry_data(opts, optionname, FALSE); |
| 595 | 595 | if (data == NULL) |
| 596 | 596 | { |
| 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); | |
| 598 | 598 | continue; |
| 599 | 599 | } |
| 600 | 600 | if ((data->flags & (OPTION_DEPRECATED | OPTION_INTERNAL)) != 0) |
| Previous | 15994 Revisions | Next |