mirror of
https://github.com/holub/mame
synced 2025-10-07 09:25:34 +03:00
info.c: worked around missing sub-devices in -lx
output [Fabio Priuli] out of whatsnew: I fear no proper and clean solution is possible as long as the driver has such a privileged role in the MAME core structure, because stuff that is not attached to a root_device (=driver) is hard to parse. Anyway, there should be no more missing roms from -lx output (until people starts adding them as sub-sub-subdevices... ;) )
This commit is contained in:
parent
ce595bc9fa
commit
08081a3031
@ -374,6 +374,12 @@ void info_xml_creator::output_one_device(device_t &device, const char *devtag)
|
|||||||
// output_devices - print the XML info for devices
|
// output_devices - print the XML info for devices
|
||||||
// with roms and for devices that can be mounted
|
// with roms and for devices that can be mounted
|
||||||
// in slots
|
// in slots
|
||||||
|
// The current solution works to some extent, but
|
||||||
|
// it is limited by the fact that devices are only
|
||||||
|
// acknowledged when attached to a driver (so that
|
||||||
|
// for instance sub-sub-devices could never appear
|
||||||
|
// in the xml input if they are not also attached
|
||||||
|
// directly to a driver as device or sub-device)
|
||||||
//-------------------------------------------------
|
//-------------------------------------------------
|
||||||
|
|
||||||
typedef tagmap_t<FPTR> slot_map;
|
typedef tagmap_t<FPTR> slot_map;
|
||||||
@ -415,6 +421,17 @@ void info_xml_creator::output_devices()
|
|||||||
if (shortnames.add(dev->shortname(), 0, FALSE) != TMERR_DUPLICATE)
|
if (shortnames.add(dev->shortname(), 0, FALSE) != TMERR_DUPLICATE)
|
||||||
output_one_device(*dev, temptag.c_str());
|
output_one_device(*dev, temptag.c_str());
|
||||||
|
|
||||||
|
// also, check for subdevices with ROMs (a few devices are missed otherwise, e.g. MPU401)
|
||||||
|
device_iterator deviter2(*dev);
|
||||||
|
for (device_t *device = deviter2.first(); device != NULL; device = deviter2.next())
|
||||||
|
{
|
||||||
|
if (device->owner() == dev && device->shortname()!= NULL && strlen(device->shortname())!=0)
|
||||||
|
{
|
||||||
|
if (shortnames.add(device->shortname(), 0, FALSE) != TMERR_DUPLICATE)
|
||||||
|
output_one_device(*device, device->tag());
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
const_cast<machine_config &>(m_drivlist.config()).device_remove(&m_drivlist.config().root_device(), temptag.c_str());
|
const_cast<machine_config &>(m_drivlist.config()).device_remove(&m_drivlist.config().root_device(), temptag.c_str());
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user