From 188921974e0b1df49c46db8d0cebd5944a833782 Mon Sep 17 00:00:00 2001 From: Miodrag Milanovic Date: Tue, 17 May 2011 09:20:03 +0000 Subject: [PATCH] Updated mconfig so in cases there is no option defined at all that default devices are mounted, this fixes issue of generating valid -listxml in case dynamic devices are used (no whatsnew) --- src/emu/mconfig.c | 13 +++++++++---- 1 file changed, 9 insertions(+), 4 deletions(-) diff --git a/src/emu/mconfig.c b/src/emu/mconfig.c index 843ed020580..b2f434d31f5 100644 --- a/src/emu/mconfig.c +++ b/src/emu/mconfig.c @@ -75,10 +75,15 @@ machine_config::machine_config(const game_driver &gamedrv, emu_options &options) const slot_interface *intf = slot->get_slot_interfaces(); if (intf != NULL) { - const char *selval = options.value(owner.tag()); - for (int i = 0; intf[i].name != NULL; i++) - if (strcmp(selval, intf[i].name) == 0) - device_add(&owner, intf[i].name, intf[i].devtype, 0); + const char *selval = options.value(owner.tag()); + if (options.seqid(owner.tag())==0) { + selval = slot->get_default_card(); + } + if (selval) { + for (int i = 0; intf[i].name != NULL; i++) + if (strcmp(selval, intf[i].name) == 0) + device_add(&owner, intf[i].name, intf[i].devtype, 0); + } } }