summaryrefslogtreecommitdiffstatshomepage
diff options
context:
space:
mode:
author AJR <ajrhacker@users.noreply.github.com>2016-03-09 19:59:25 -0500
committer AJR <ajrhacker@users.noreply.github.com>2016-03-09 19:59:25 -0500
commit2acc33d8a7c0bf498838d1751319457d30a84a2b (patch)
tree28212fb0a5181bdffeb4f915ac255926ab675719
parentc014845c2e2fda7a56adcd6c6f5901d15fe097f4 (diff)
Let slot_default in softlists override INIs (but not the command line)
-rw-r--r--src/emu/emuopts.cpp10
-rw-r--r--src/emu/emuopts.h3
2 files changed, 9 insertions, 4 deletions
diff --git a/src/emu/emuopts.cpp b/src/emu/emuopts.cpp
index b9187edea57..bf83f2d6ace 100644
--- a/src/emu/emuopts.cpp
+++ b/src/emu/emuopts.cpp
@@ -32,7 +32,7 @@ const options_entry emu_options::s_option_entries[] =
{ OPTION_READCONFIG ";rc", "1", OPTION_BOOLEAN, "enable loading of configuration files" },
{ OPTION_WRITECONFIG ";wc", "0", OPTION_BOOLEAN, "writes configuration to (driver).ini on exit" },
- // seach path options
+ // search path options
{ nullptr, nullptr, OPTION_HEADER, "CORE SEARCH PATH OPTIONS" },
{ OPTION_MEDIAPATH ";rp;biospath;bp", "roms", OPTION_STRING, "path to ROMsets and hard disk images" },
{ OPTION_HASHPATH ";hash_directory;hash", "hash", OPTION_STRING, "path to hash files" },
@@ -270,7 +270,11 @@ bool emu_options::add_slot_options(const software_part *swpart)
std::string featurename = std::string(name).append("_default");
const char *value = swpart->feature(featurename.c_str());
if (value != nullptr && (*value == '\0' || slot->option(value) != nullptr))
- set_default_value(name, value);
+ {
+ // set priority above INIs but below actual command line
+ std::string error;
+ set_value(name, value, OPTION_PRIORITY_SUBCMD, error);
+ }
}
}
return (options_count() != starting_count);
@@ -391,7 +395,7 @@ bool emu_options::parse_slot_devices(int argc, char *argv[], std::string &error_
m_device_options = 0;
add_device_options();
if (name != nullptr && exists(name))
- set_value(name, value, OPTION_PRIORITY_CMDLINE, error_string);
+ set_value(name, value, OPTION_PRIORITY_SUBCMD, error_string);
core_options::parse_command_line(argc, argv, OPTION_PRIORITY_CMDLINE, error_string);
int num;
diff --git a/src/emu/emuopts.h b/src/emu/emuopts.h
index 79df39c7438..0512924dd59 100644
--- a/src/emu/emuopts.h
+++ b/src/emu/emuopts.h
@@ -23,7 +23,8 @@
enum
{
// command-line options are HIGH priority
- OPTION_PRIORITY_CMDLINE = OPTION_PRIORITY_HIGH,
+ OPTION_PRIORITY_SUBCMD = OPTION_PRIORITY_HIGH,
+ OPTION_PRIORITY_CMDLINE,
// INI-based options are NORMAL priority, in increasing order:
OPTION_PRIORITY_INI = OPTION_PRIORITY_NORMAL,