src/emu/uimain.c
| r15408 | r15409 | |
| 180 | 180 | slot_interface_iterator slotiter(machine().root_device()); |
| 181 | 181 | if (slotiter.first() != NULL) |
| 182 | 182 | { |
| 183 | | bool display = false; |
| 184 | | for (const device_slot_interface *slot = slotiter.first(); slot != NULL; slot = slotiter.next()) |
| 185 | | { |
| 186 | | if (slot->fixed()) continue; |
| 187 | | display = true; |
| 188 | | } |
| 189 | | /* add image info menu */ |
| 190 | | if (display) item_append("Slot Devices", NULL, 0, (void *)SLOT_DEVICES); |
| 183 | /* add slot info menu */ |
| 184 | item_append("Slot Devices", NULL, 0, (void *)SLOT_DEVICES); |
| 191 | 185 | } |
| 192 | 186 | |
| 193 | 187 | network_interface_iterator netiter(machine().root_device()); |
| r15408 | r15409 | |
| 458 | 452 | slot_interface_iterator iter(machine().root_device()); |
| 459 | 453 | for (device_slot_interface *slot = iter.first(); slot != NULL; slot = iter.next()) |
| 460 | 454 | { |
| 461 | | // do no display fixed slots |
| 462 | | if (slot->fixed()) continue; |
| 463 | 455 | /* record the menu item */ |
| 464 | 456 | const char *title = get_slot_device(slot); |
| 465 | | item_append(slot->device().tag()+1, strcmp(title,"")==0 ? "------" : title, MENU_FLAG_LEFT_ARROW | MENU_FLAG_RIGHT_ARROW, (void *)slot); |
| 457 | // do no display fixed slots |
| 458 | if (slot->fixed()) title = slot->get_default_card(); |
| 459 | |
| 460 | item_append(slot->device().tag()+1, strcmp(title,"")==0 ? "------" : title, slot->fixed() ? 0 : (MENU_FLAG_LEFT_ARROW | MENU_FLAG_RIGHT_ARROW), (void *)slot); |
| 466 | 461 | } |
| 467 | 462 | item_append(MENU_SEPARATOR_ITEM, NULL, 0, NULL); |
| 468 | 463 | item_append("Reset", NULL, 0, NULL); |
src/emu/info.c
| r15408 | r15409 | |
| 1285 | 1285 | fprintf(m_output, "\t\t\t<slotoption"); |
| 1286 | 1286 | fprintf(m_output, " name=\"%s\"", xml_normalize_string(intf[i].name)); |
| 1287 | 1287 | fprintf(m_output, " devname=\"%s\"", xml_normalize_string(dev->shortname())); |
| 1288 | | if (slot->get_default_card(m_drivlist.config(), m_drivlist.options())) |
| 1288 | if (slot->get_default_card()) |
| 1289 | 1289 | { |
| 1290 | | if (strcmp(slot->get_default_card(m_drivlist.config(), m_drivlist.options()),intf[i].name)==0) |
| 1290 | if (strcmp(slot->get_default_card(),intf[i].name)==0) |
| 1291 | 1291 | fprintf(m_output, " default=\"yes\""); |
| 1292 | 1292 | } |
| 1293 | 1293 | fprintf(m_output, "/>\n"); |
src/emu/dislot.h
| r15408 | r15409 | |
| 56 | 56 | |
| 57 | 57 | static void static_set_slot_info(device_t &device, const slot_interface *slots_info, const char *default_card,const input_device_default *default_input, const void *default_config, UINT32 default_clock, bool fixed); |
| 58 | 58 | const slot_interface* get_slot_interfaces() const { return m_slot_interfaces; }; |
| 59 | | const char * get_default_card(const machine_config &config, emu_options &options) const { return m_default_card; }; |
| 59 | const char * get_default_card() const { return m_default_card; }; |
| 60 | 60 | virtual const char * get_default_card_software(const machine_config &config, emu_options &options) { return NULL; }; |
| 61 | 61 | const input_device_default *input_ports_defaults() const { return m_input_defaults; } |
| 62 | 62 | const void *default_config() const { return m_default_config; } |
src/emu/mconfig.c
| r15408 | r15409 | |
| 80 | 80 | const char *selval = options.value(owner.tag()+1); |
| 81 | 81 | bool isdefault = (options.priority(owner.tag()+1)==OPTION_PRIORITY_DEFAULT); |
| 82 | 82 | if (!is_selected_driver || !options.exists(owner.tag()+1)) |
| 83 | | selval = slot->get_default_card(*this, options); |
| 83 | selval = slot->get_default_card(); |
| 84 | 84 | |
| 85 | 85 | if (selval != NULL && strlen(selval) != 0) |
| 86 | 86 | { |
| r15408 | r15409 | |
| 91 | 91 | { |
| 92 | 92 | if ((!intf[i].internal) || (isdefault && intf[i].internal)) |
| 93 | 93 | { |
| 94 | | const char *def = slot->get_default_card(*this, options); |
| 94 | const char *def = slot->get_default_card(); |
| 95 | 95 | bool is_default = (def != NULL && strcmp(def, selval) == 0); |
| 96 | 96 | device_t *new_dev = device_add(&owner, intf[i].name, intf[i].devtype, is_default ? slot->default_clock() : 0); |
| 97 | 97 | found = true; |