trunk/src/lib/util/options.c
| r17632 | r17633 | |
| 811 | 811 | curentry.set_value(data, priority); |
| 812 | 812 | return true; |
| 813 | 813 | } |
| 814 | |
| 815 | //------------------------------------------------- |
| 816 | // options_count - take number of existing |
| 817 | // number of options in structure |
| 818 | //------------------------------------------------- |
| 819 | |
| 820 | int core_options::options_count() |
| 821 | { |
| 822 | int number = 0; |
| 823 | for (entry *curentry = m_entrylist; curentry != NULL; curentry = curentry->next()) number++; |
| 824 | return number; |
| 825 | } |
| | No newline at end of file |
trunk/src/emu/emuopts.c
| r17632 | r17633 | |
| 377 | 377 | set_value(name, value, OPTION_PRIORITY_CMDLINE, error_string); |
| 378 | 378 | } |
| 379 | 379 | result = core_options::parse_command_line(argc, argv, OPTION_PRIORITY_CMDLINE, error_string); |
| 380 | | update_slot_options(); |
| 381 | | while (add_slot_options(false)); |
| 382 | | add_device_options(true); |
| 383 | | result = core_options::parse_command_line(argc, argv, OPTION_PRIORITY_CMDLINE, error_string); |
| 380 | |
| 381 | int num = 0; |
| 382 | do { |
| 383 | num = options_count(); |
| 384 | update_slot_options(); |
| 385 | while (add_slot_options(false)); |
| 386 | add_device_options(false); |
| 387 | result = core_options::parse_command_line(argc, argv, OPTION_PRIORITY_CMDLINE, error_string); |
| 388 | } while(num != options_count()); |
| 389 | |
| 384 | 390 | return result; |
| 385 | 391 | } |
| 386 | 392 | |
| r17632 | r17633 | |
| 510 | 516 | } |
| 511 | 517 | // then add the options |
| 512 | 518 | add_device_options(true); |
| 513 | | update_slot_options(); |
| 514 | | while (add_slot_options(false)); |
| 515 | | add_device_options(true); |
| 519 | int num = 0; |
| 520 | do { |
| 521 | num = options_count(); |
| 522 | update_slot_options(); |
| 523 | while (add_slot_options(false)); |
| 524 | add_device_options(false); |
| 525 | } while(num != options_count()); |
| 516 | 526 | } |
| 517 | 527 | } |
| 518 | 528 | |