Proper fix for issues with slots, removed old fix too (no whatsnew)

This commit is contained in:
Miodrag Milanovic 2012-02-05 07:00:09 +00:00
parent a4d175be28
commit 02fab75990
2 changed files with 3 additions and 5 deletions

View File

@ -68,6 +68,7 @@ machine_config::machine_config(const game_driver &gamedrv, emu_options &options)
// construct the config // construct the config
(*gamedrv.machine_config)(*this, NULL); (*gamedrv.machine_config)(*this, NULL);
bool is_selected_driver = strcmp(gamedrv.name,options.system_name())==0;
// intialize slot devices - make sure that any required devices have been allocated // intialize slot devices - make sure that any required devices have been allocated
slot_interface_iterator slotiter(root_device()); slot_interface_iterator slotiter(root_device());
for (device_slot_interface *slot = slotiter.first(); slot != NULL; slot = slotiter.next()) for (device_slot_interface *slot = slotiter.first(); slot != NULL; slot = slotiter.next())
@ -77,7 +78,7 @@ machine_config::machine_config(const game_driver &gamedrv, emu_options &options)
{ {
device_t &owner = slot->device(); device_t &owner = slot->device();
const char *selval = options.value(owner.tag()+1); const char *selval = options.value(owner.tag()+1);
if (!options.exists(owner.tag()+1)) if (!is_selected_driver || !options.exists(owner.tag()+1))
selval = slot->get_default_card(*this, options); selval = slot->get_default_card(*this, options);
if (selval != NULL && strlen(selval) != 0) if (selval != NULL && strlen(selval) != 0)

View File

@ -296,10 +296,7 @@ void validity_checker::validate_one(const game_driver &driver)
// wrap in try/except to catch fatalerrors // wrap in try/except to catch fatalerrors
try try
{ {
emu_options validation_options(m_drivlist.options()); machine_config config(driver, m_drivlist.options());
validation_options.remove_device_options();
machine_config config(driver, validation_options);
m_current_config = &config; m_current_config = &config;
validate_driver(); validate_driver();
validate_roms(); validate_roms();