summaryrefslogtreecommitdiffstatshomepage
path: root/src/emu/emuopts.c
diff options
context:
space:
mode:
author Miodrag Milanovic <mmicko@gmail.com>2011-11-09 10:28:30 +0000
committer Miodrag Milanovic <mmicko@gmail.com>2011-11-09 10:28:30 +0000
commite0f276b74bfeb2804d476fc3e8b254990a1ccaa3 (patch)
treead330cd1bc6087ace6cdc2bb2c096f2d15212ecb /src/emu/emuopts.c
parent7c00fd2a52849905a602a25dbced178ccb21e72d (diff)
Change order of parsing in emu_options, so first all slot devices are set and then image devices.
Also update lib/util/options.c so now parsing is not stopped on first unknown parameter, this way order of options in command line is not important for dynamic options (no whatsnew)
Diffstat (limited to 'src/emu/emuopts.c')
-rw-r--r--src/emu/emuopts.c8
1 files changed, 3 insertions, 5 deletions
diff --git a/src/emu/emuopts.c b/src/emu/emuopts.c
index b347ed02205..87d781589cf 100644
--- a/src/emu/emuopts.c
+++ b/src/emu/emuopts.c
@@ -337,7 +337,6 @@ void emu_options::remove_device_options()
bool emu_options::parse_slot_devices(int argc, char *argv[], astring &error_string, const char *name, const char *value)
{
remove_device_options();
- add_device_options(true);
if (name && exists(name)) {
set_value(name, value, OPTION_PRIORITY_CMDLINE, error_string);
}
@@ -345,12 +344,12 @@ bool emu_options::parse_slot_devices(int argc, char *argv[], astring &error_stri
bool result = core_options::parse_command_line(argc, argv, OPTION_PRIORITY_CMDLINE, error_string);
while (add_slot_options(isfirst)) {
result = core_options::parse_command_line(argc, argv, OPTION_PRIORITY_CMDLINE, error_string);
- add_device_options(false);
if (name && exists(name)) {
set_value(name, value, OPTION_PRIORITY_CMDLINE, error_string);
}
isfirst = false;
}
+ add_device_options(true);
result = core_options::parse_command_line(argc, argv, OPTION_PRIORITY_CMDLINE, error_string);
return result;
}
@@ -470,14 +469,13 @@ void emu_options::set_system_name(const char *name)
assert(!error);
// remove any existing device options
remove_device_options();
- // then add the options
- add_device_options(true);
bool isfirst = true;
while (add_slot_options(isfirst)) {
- add_device_options(false);
isfirst = false;
}
+ // then add the options
+ add_device_options(true);
}
}