mirror of
https://github.com/holub/mame
synced 2025-07-05 18:08:04 +03:00
Multi part software list items that do have different interfaces used are mounted now (only first part per interface part is loaded) (no whatsnew)
This commit is contained in:
parent
e022252bf2
commit
b58c772d9a
@ -200,24 +200,33 @@ int cli_frontend::execute(int argc, char **argv)
|
|||||||
{
|
{
|
||||||
software_info *swinfo = software_list_find(list, m_options.software_name(), NULL);
|
software_info *swinfo = software_list_find(list, m_options.software_name(), NULL);
|
||||||
if (swinfo!=NULL) {
|
if (swinfo!=NULL) {
|
||||||
const device_image_interface *image = NULL;
|
for (software_part *swpart = software_find_part(swinfo, NULL, NULL); swpart != NULL; swpart = software_part_next(swpart))
|
||||||
software_part *part = software_find_part(swinfo, NULL, NULL);
|
|
||||||
// search for a device with the right interface
|
|
||||||
for (bool gotone = config.devicelist().first(image); gotone; gotone = image->next(image))
|
|
||||||
{
|
{
|
||||||
const char *interface = image->image_interface();
|
// loop trough all parts
|
||||||
if (interface != NULL)
|
// search for a device with the right interface
|
||||||
|
const device_image_interface *image = NULL;
|
||||||
|
for (bool gotone = config.devicelist().first(image); gotone; gotone = image->next(image))
|
||||||
{
|
{
|
||||||
if (!strcmp(interface, part->interface_))
|
const char *interface = image->image_interface();
|
||||||
{
|
if (interface != NULL)
|
||||||
astring error;
|
{
|
||||||
m_options.set_value(image->brief_instance_name(), m_options.software_name(), OPTION_PRIORITY_CMDLINE, error);
|
if (!strcmp(interface, swpart->interface_))
|
||||||
assert(!error);
|
{
|
||||||
software_list_close(list);
|
const char *option = m_options.value(image->brief_instance_name());
|
||||||
break;
|
// mount only if not already mounted
|
||||||
|
if (strlen(option)==0) {
|
||||||
|
astring val;
|
||||||
|
astring error;
|
||||||
|
val.printf("%s:%s",m_options.software_name(),swpart->name);
|
||||||
|
m_options.set_value(image->brief_instance_name(), val.cstr(), OPTION_PRIORITY_CMDLINE, error);
|
||||||
|
assert(!error);
|
||||||
|
}
|
||||||
|
break;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
software_list_close(list);
|
||||||
found = TRUE;
|
found = TRUE;
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user