From a87d6d044259d850f1e4e40b265fff0cf4986f57 Mon Sep 17 00:00:00 2001 From: etabeta78 Date: Mon, 19 Jan 2015 11:48:33 +0100 Subject: [PATCH] ui: fixed bug where software items that shall create new image devices (e.g., passthru carts) or new slot options, failed to do so when loaded through the File Manager in the internal UI. [Fabio Priuli] out of whatsnew: to see the bug, try to launch with previous code nes with no options, then mount ggenie cart and, after the reboot, try to mount any other game in the -cart2 media switch. System will reboot, but only ggenie remains mounted. Alternatively, launch c64 and manually mount cbmieee from the UI. After reboot the serial slot options in the Slot Options menu are not configurable, because the core was not "informed" of their addition, and any cart you try to mount in -cart2 will be ignored, because the new media switch is not acknowledged by the core. Once again, from command line everything was fine, and thus the issue was hard to spot :) --- src/emu/emuopts.c | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/src/emu/emuopts.c b/src/emu/emuopts.c index e9651110ecc..1b34b86518e 100644 --- a/src/emu/emuopts.c +++ b/src/emu/emuopts.c @@ -278,6 +278,8 @@ void emu_options::update_slot_options() } } } + while (add_slot_options(false)); + add_device_options(false); } @@ -365,8 +367,6 @@ bool emu_options::parse_slot_devices(int argc, char *argv[], astring &error_stri do { num = options_count(); update_slot_options(); - while (add_slot_options(false)); - add_device_options(false); result = core_options::parse_command_line(argc, argv, OPTION_PRIORITY_CMDLINE, error_string); } while (num != options_count()); @@ -502,8 +502,6 @@ void emu_options::set_system_name(const char *name) do { num = options_count(); update_slot_options(); - while (add_slot_options(false)); - add_device_options(false); } while(num != options_count()); } }