Previous 15994 Revisions Next

r14179 Wednesday 25th January, 2012 at 15:22:55 UTC by Miodrag Milanović
Parameter names are now without : (no whatsnew)
[src/emu]clifront.c dislot.c emuopts.c info.c mconfig.c uimain.c

src/emu/emuopts.c
r14178r14179
244244      first = false;
245245
246246      // retrieve info about the device instance
247      astring option_name;
248      option_name.printf("%s;%s", slot->device().tag(), slot->device().tag());
247      if (!exists(slot->device().tag() + 1)) {
249248
250      if (!exists(slot->device().tag())) {
251
252249         // add the option
253         entry[0].name = slot->device().tag();
250         entry[0].name = slot->device().tag() + 1;
254251         entry[0].description = NULL;
255252         entry[0].flags = OPTION_STRING | OPTION_FLAG_DEVICE;
256253         entry[0].defvalue = (slot->get_slot_interfaces() != NULL) ? slot->get_default_card(config,*this) : NULL;
r14178r14179
281278   for (const device_slot_interface *slot = iter.first(); slot != NULL; slot = iter.next())
282279   {
283280      // retrieve info about the device instance
284      astring option_name;
285      option_name.printf("%s;%s", slot->device().tag(), slot->device().tag());
286
287      if (exists(slot->device().tag())) {
281      if (exists(slot->device().tag()+1)) {
288282         if (slot->get_slot_interfaces() != NULL) {
289283            const char *def = slot->get_default_card_software(config,*this);
290            if (def) set_default_value(slot->device().tag(),def);
284            if (def) set_default_value(slot->device().tag()+1,def);
291285         }
292286      }
293287   }
src/emu/clifront.c
r14178r14179
644644      for (const device_slot_interface *slot = iter.first(); slot != NULL; slot = iter.next())
645645      {
646646         // output the line, up to the list of extensions
647         printf("%-13s%-10s   ", first ? drivlist.driver().name : "", slot->device().tag());
647         printf("%-13s%-10s   ", first ? drivlist.driver().name : "", slot->device().tag()+1);
648648
649649         // get the options and print them
650650         const slot_interface* intf = slot->get_slot_interfaces();
src/emu/uimain.c
r14178r14179
355355-------------------------------------------------*/
356356int ui_menu_slot_devices::slot_get_current_index(device_slot_interface *slot)
357357{
358   const char *current = machine().options().value(slot->device().tag());
358   const char *current = machine().options().value(slot->device().tag()+1);
359359   const slot_interface* intf = slot->get_slot_interfaces();
360360   int val = -1;
361361   for (int i = 0; intf[i].name != NULL; i++) {
r14178r14179
402402-------------------------------------------------*/
403403const char *ui_menu_slot_devices::get_slot_device(device_slot_interface *slot)
404404{
405   return machine().options().value(slot->device().tag());
405   return machine().options().value(slot->device().tag()+1);
406406}
407407
408408
r14178r14179
414414void ui_menu_slot_devices::set_slot_device(device_slot_interface *slot, const char *val)
415415{
416416   astring error;
417   machine().options().set_value(slot->device().tag(), val, OPTION_PRIORITY_CMDLINE, error);
417   machine().options().set_value(slot->device().tag()+1, val, OPTION_PRIORITY_CMDLINE, error);
418418   assert(!error);
419419}
420420
r14178r14179
435435   {
436436      /* record the menu item */
437437      const char *title = get_slot_device(slot);
438      item_append(slot->device().tag(), strcmp(title,"")==0 ? "------" : title, MENU_FLAG_LEFT_ARROW | MENU_FLAG_RIGHT_ARROW, (void *)slot);
438      item_append(slot->device().tag()+1, strcmp(title,"")==0 ? "------" : title, MENU_FLAG_LEFT_ARROW | MENU_FLAG_RIGHT_ARROW, (void *)slot);
439439   }
440440   item_append(MENU_SEPARATOR_ITEM, NULL, 0, NULL);
441441   item_append("Reset",  NULL, 0, NULL);
src/emu/info.c
r14178r14179
12031203   for (const device_slot_interface *slot = iter.first(); slot != NULL; slot = iter.next())
12041204   {
12051205      // print m_output device type
1206      fprintf(m_output, "\t\t<slot name=\"%s\">\n", xml_normalize_string(slot->device().tag()));
1206      fprintf(m_output, "\t\t<slot name=\"%s\">\n", xml_normalize_string(slot->device().tag()+1));
12071207
12081208      /*
12091209        if (slot->slot_interface()[0])
src/emu/dislot.c
r14178r14179
3232{
3333   const char *subtag;
3434   device_t *dev = NULL;
35   if (!device().mconfig().options().exists(device().tag())) {
35   if (!device().mconfig().options().exists(device().tag()+1)) {
3636      subtag = m_default_card;
3737   } else {
38      subtag = device().mconfig().options().value(device().tag());
38      subtag = device().mconfig().options().value(device().tag()+1);
3939   }
4040   if (subtag && strlen(subtag)>0) {
4141      device_slot_card_interface *intf = NULL;
src/emu/mconfig.c
r14178r14179
7676      if (intf != NULL)
7777      {
7878         device_t &owner = slot->device();
79         const char *selval = options.value(owner.tag());
80         if (!options.exists(owner.tag()))
79         const char *selval = options.value(owner.tag()+1);
80         if (!options.exists(owner.tag()+1))
8181            selval = slot->get_default_card(*this, options);
8282
8383         if (selval != NULL && strlen(selval) != 0)
r14178r14179
9595               }
9696            }
9797            if (!found)
98               throw emu_fatalerror("Unknown slot option '%s' in slot '%s'", selval, owner.tag());
98               throw emu_fatalerror("Unknown slot option '%s' in slot '%s'", selval, owner.tag()+1);
9999         }
100100      }
101101   }

Previous 15994 Revisions Next


© 1998-2018 The MESS Team