mirror of
https://github.com/holub/mame
synced 2025-07-04 01:18:59 +03:00
Removed unselectable slot options (SLOT_INTERFACE_INTERNAL) from the -listxml output. [Curt Coder]
This commit is contained in:
parent
beff1ef9a0
commit
7d5ef42206
@ -1279,20 +1279,23 @@ void info_xml_creator::output_slots(device_t &device, const char *root_tag)
|
|||||||
|
|
||||||
for (const device_slot_option *option = slot->first_option(); option != NULL; option = option->next())
|
for (const device_slot_option *option = slot->first_option(); option != NULL; option = option->next())
|
||||||
{
|
{
|
||||||
device_t *dev = const_cast<machine_config &>(m_drivlist.config()).device_add(&m_drivlist.config().root_device(), "dummy", option->devtype(), 0);
|
if (option->selectable())
|
||||||
if (!dev->configured())
|
|
||||||
dev->config_complete();
|
|
||||||
|
|
||||||
fprintf(m_output, "\t\t\t<slotoption");
|
|
||||||
fprintf(m_output, " name=\"%s\"", xml_normalize_string(option->name()));
|
|
||||||
fprintf(m_output, " devname=\"%s\"", xml_normalize_string(dev->shortname()));
|
|
||||||
if (slot->default_option())
|
|
||||||
{
|
{
|
||||||
if (strcmp(slot->default_option(),option->name())==0)
|
device_t *dev = const_cast<machine_config &>(m_drivlist.config()).device_add(&m_drivlist.config().root_device(), "dummy", option->devtype(), 0);
|
||||||
fprintf(m_output, " default=\"yes\"");
|
if (!dev->configured())
|
||||||
|
dev->config_complete();
|
||||||
|
|
||||||
|
fprintf(m_output, "\t\t\t<slotoption");
|
||||||
|
fprintf(m_output, " name=\"%s\"", xml_normalize_string(option->name()));
|
||||||
|
fprintf(m_output, " devname=\"%s\"", xml_normalize_string(dev->shortname()));
|
||||||
|
if (slot->default_option())
|
||||||
|
{
|
||||||
|
if (strcmp(slot->default_option(),option->name())==0)
|
||||||
|
fprintf(m_output, " default=\"yes\"");
|
||||||
|
}
|
||||||
|
fprintf(m_output, "/>\n");
|
||||||
|
const_cast<machine_config &>(m_drivlist.config()).device_remove(&m_drivlist.config().root_device(), "dummy");
|
||||||
}
|
}
|
||||||
fprintf(m_output, "/>\n");
|
|
||||||
const_cast<machine_config &>(m_drivlist.config()).device_remove(&m_drivlist.config().root_device(), "dummy");
|
|
||||||
}
|
}
|
||||||
|
|
||||||
fprintf(m_output, "\t\t</slot>\n");
|
fprintf(m_output, "\t\t</slot>\n");
|
||||||
|
Loading…
Reference in New Issue
Block a user