src/emu/clifront.c
| r11970 | r11971 | |
| 202 | 202 | if (swinfo!=NULL) { |
| 203 | 203 | for (software_part *swpart = software_find_part(swinfo, NULL, NULL); swpart != NULL; swpart = software_part_next(swpart)) |
| 204 | 204 | { |
| 205 | | // loop trough all parts |
| 206 | | // search for a device with the right interface |
| 207 | | const device_image_interface *image = NULL; |
| 208 | | for (bool gotone = config.devicelist().first(image); gotone; gotone = image->next(image)) |
| 209 | | { |
| 210 | | const char *interface = image->image_interface(); |
| 211 | | if (interface != NULL) |
| 212 | | { |
| 213 | | if (!strcmp(interface, swpart->interface_)) |
| 214 | | { |
| 215 | | const char *option = m_options.value(image->brief_instance_name()); |
| 216 | | // mount only if not already mounted |
| 217 | | if (strlen(option)==0) { |
| 218 | | astring val; |
| 219 | | astring error; |
| 220 | | val.printf("%s:%s",m_options.software_name(),swpart->name); |
| 221 | | m_options.set_value(image->brief_instance_name(), val.cstr(), OPTION_PRIORITY_CMDLINE, error); |
| 222 | | assert(!error); |
| 205 | const char *mount = software_part_get_feature(swpart, "automount"); |
| 206 | if (mount==NULL || strcmp(mount,"no")!=0) { |
| 207 | // loop trough all parts |
| 208 | // search for a device with the right interface |
| 209 | const device_image_interface *image = NULL; |
| 210 | for (bool gotone = config.devicelist().first(image); gotone; gotone = image->next(image)) |
| 211 | { |
| 212 | const char *interface = image->image_interface(); |
| 213 | if (interface != NULL) |
| 214 | { |
| 215 | if (!strcmp(interface, swpart->interface_)) |
| 216 | { |
| 217 | const char *option = m_options.value(image->brief_instance_name()); |
| 218 | // mount only if not already mounted |
| 219 | if (strlen(option)==0) { |
| 220 | astring val; |
| 221 | astring error; |
| 222 | val.printf("%s:%s",m_options.software_name(),swpart->name); |
| 223 | m_options.set_value(image->brief_instance_name(), val.cstr(), OPTION_PRIORITY_CMDLINE, error); |
| 224 | assert(!error); |
| 225 | } |
| 226 | break; |
| 223 | 227 | } |
| 224 | | break; |
| 225 | 228 | } |
| 226 | 229 | } |
| 227 | 230 | } |