src/emu/mconfig.c
| r13238 | r13239 | |
| 79 | 79 | if (!options.exists(owner.tag())) |
| 80 | 80 | selval = slot->get_default_card(devicelist(), options); |
| 81 | 81 | |
| 82 | | if (selval != NULL) |
| 83 | | for (int i = 0; intf[i].name != NULL; i++) |
| 82 | if (selval != NULL && strlen(selval)!=0) { |
| 83 | bool found = false; |
| 84 | for (int i = 0; intf[i].name != NULL; i++) { |
| 84 | 85 | if (strcmp(selval, intf[i].name) == 0) { |
| 85 | 86 | device_t *new_dev = device_add(&owner, intf[i].name, intf[i].devtype, 0); |
| 87 | found = true; |
| 86 | 88 | if (!options.exists(owner.tag())) |
| 87 | 89 | device_t::static_set_input_default(*new_dev, slot->input_ports_defaults()); |
| 88 | 90 | } |
| 91 | } |
| 92 | if (!found) |
| 93 | throw emu_fatalerror("Unknown slot option '%s' in slot '%s'", selval, owner.tag()); |
| 94 | } |
| 89 | 95 | } |
| 90 | 96 | } |
| 91 | 97 | |