diff options
author | 2014-05-08 07:39:04 +0000 | |
---|---|---|
committer | 2014-05-08 07:39:04 +0000 | |
commit | 69faaf3aeb0ed3f8a95743053a3467f0f5a747f5 (patch) | |
tree | 08a20ce98c5661168e7f31e4539056f64cdcaa6e /src/lib/util/options.c | |
parent | 198162b8f51fe3a04319462bcc45ab470e2e3066 (diff) |
-Reorganized OSD, handling more sound output systems and debuggers, defaults left same as before [Miodrag Milanovic]
-Created osd_options as base option class for non-system specific options
Diffstat (limited to 'src/lib/util/options.c')
-rw-r--r-- | src/lib/util/options.c | 39 |
1 files changed, 39 insertions, 0 deletions
diff --git a/src/lib/util/options.c b/src/lib/util/options.c index 7aa08ad0500..96315678471 100644 --- a/src/lib/util/options.c +++ b/src/lib/util/options.c @@ -124,6 +124,17 @@ void core_options::entry::set_default_value(const char *defvalue) } +//------------------------------------------------- +// set_description - set the description of +// an option +//------------------------------------------------- + +void core_options::entry::set_description(const char *description) +{ + m_description = description; +} + + void core_options::entry::set_flag(UINT32 mask, UINT32 flag) { m_flags = ( m_flags & mask ) | flag; @@ -299,6 +310,23 @@ void core_options::set_default_value(const char *name, const char *defvalue) //------------------------------------------------- +// set_description - change the description +// of an option +//------------------------------------------------- + +void core_options::set_description(const char *name, const char *description) +{ + // find the entry and bail if we can't + entry *curentry = m_entrymap.find(name); + if (curentry == NULL) + return; + + // update the data and default data + curentry->set_description(description); +} + + +//------------------------------------------------- // parse_command_line - parse a series of // command line arguments //------------------------------------------------- @@ -543,6 +571,17 @@ const char *core_options::value(const char *name) const //------------------------------------------------- +// description - return description of option +//------------------------------------------------- + +const char *core_options::description(const char *name) const +{ + entry *curentry = m_entrymap.find(name); + return (curentry != NULL) ? curentry->description() : ""; +} + + +//------------------------------------------------- // priority - return the priority of option //------------------------------------------------- |