diff options
author | 2012-09-05 10:30:30 +0000 | |
---|---|---|
committer | 2012-09-05 10:30:30 +0000 | |
commit | 913ee29d76c7334fa2a35e344028cd88cce59804 (patch) | |
tree | 585d4bb82abda142bfed890f613c533e5250b67f /src/emu/uimain.c | |
parent | f6c7aa39ba49bb71f9d46c89182bad85d84474ca (diff) |
Made core able to use bios selection per slot device [Miodrag Milanovic]
Sample of usage :
mess kc85_4 -exp d004gide,bios=v31
Will need to cleanup handling of sub options to make it more robust and able to validate
Diffstat (limited to 'src/emu/uimain.c')
-rw-r--r-- | src/emu/uimain.c | 13 |
1 files changed, 11 insertions, 2 deletions
diff --git a/src/emu/uimain.c b/src/emu/uimain.c index b6ce828c5b7..ca462766de4 100644 --- a/src/emu/uimain.c +++ b/src/emu/uimain.c @@ -367,7 +367,8 @@ void ui_menu_keyboard_mode::handle() -------------------------------------------------*/ int ui_menu_slot_devices::slot_get_current_index(device_slot_interface *slot) { - const char *current = machine().options().value(slot->device().tag()+1); + astring temp; + const char *current = machine().options().main_value(temp,slot->device().tag()+1); const slot_interface* intf = slot->get_slot_interfaces(); int val = -1; for (int i = 0; intf[i].name != NULL; i++) { @@ -421,7 +422,8 @@ const char *ui_menu_slot_devices::slot_get_prev(device_slot_interface *slot) -------------------------------------------------*/ const char *ui_menu_slot_devices::get_slot_device(device_slot_interface *slot) { - return machine().options().value(slot->device().tag()+1); + astring temp; + return machine().options().main_value(temp,slot->device().tag()+1); } @@ -551,6 +553,13 @@ void ui_menu_bios_selection::handle() astring error; machine().options().set_value("bios", val-1, OPTION_PRIORITY_CMDLINE, error); assert(!error); + } else { + astring error; + astring value; + astring temp; + value.printf("%s,bios=%d",machine().options().main_value(temp,dev->owner()->tag()+1),val-1); + machine().options().set_value(dev->owner()->tag()+1, value.cstr(), OPTION_PRIORITY_CMDLINE, error); + assert(!error); } reset(UI_MENU_RESET_REMEMBER_REF); } |