diff options
author | etabeta78 <etabeta78@users.noreply.github.com> | 2015-01-17 10:30:03 +0100 |
---|---|---|
committer | etabeta78 <etabeta78@users.noreply.github.com> | 2015-01-17 10:30:03 +0100 |
commit | 840460c828a0ed8601798c8817f4349663211105 (patch) | |
tree | 0ad9125c5ac43cbc65b8d31e3670009a54107f16 | |
parent | da8c30dfe4a7b13454ed28386ec009208016dba7 (diff) |
ui: fixed bug where slot options set via internal UI did not properly
create their sub-options. [Fabio Priuli]
out of whatsnew: to see the bug, try to manually set from the UI "com" in a PC ISA port or "multitap" in
the SMS driver in an old build, then reset (to apply changes) and re-enter the Slot Options menu just
to see that the sub-options (the com serial ports and the multitap joypads) are not configurable because
the core was not "informed" of their addition. no bug was present if the options were set from command
line or from QMC2, so it was not so easy to spot the issue...
-rw-r--r-- | src/emu/emuopts.h | 3 | ||||
-rw-r--r-- | src/emu/ui/slotopt.c | 3 |
2 files changed, 5 insertions, 1 deletions
diff --git a/src/emu/emuopts.h b/src/emu/emuopts.h index 3b9f4d94aba..880a51a2d09 100644 --- a/src/emu/emuopts.h +++ b/src/emu/emuopts.h @@ -354,10 +354,11 @@ public: const char *main_value(astring &buffer, const char *option) const; const char *sub_value(astring &buffer, const char *name, const char *subname) const; + bool add_slot_options(bool isfirst); + private: // device-specific option handling void add_device_options(bool isfirst); - bool add_slot_options(bool isfirst); void update_slot_options(); // INI parsing helper diff --git a/src/emu/ui/slotopt.c b/src/emu/ui/slotopt.c index 3347baca00a..04e9b1fafa4 100644 --- a/src/emu/ui/slotopt.c +++ b/src/emu/ui/slotopt.c @@ -188,7 +188,10 @@ void ui_menu_slot_devices::handle() if (menu_event != NULL && menu_event->itemref != NULL) { if ((FPTR)menu_event->itemref == 1 && menu_event->iptkey == IPT_UI_SELECT) + { + machine().options().add_slot_options(false); machine().schedule_hard_reset(); + } else if (menu_event->iptkey == IPT_UI_LEFT || menu_event->iptkey == IPT_UI_RIGHT) { device_slot_interface *slot = (device_slot_interface *)menu_event->itemref; |