summaryrefslogtreecommitdiffstatshomepage
path: root/src/lib/util/options.c
diff options
context:
space:
mode:
author Wilbert Pol <wilbert@jdg.info>2013-02-27 21:41:49 +0000
committer Wilbert Pol <wilbert@jdg.info>2013-02-27 21:41:49 +0000
commit3dd335f46d5427a4f4a46045f09fec12d61b02cc (patch)
treea3f8bd464ecc690ee245cb75cd170ae0043f23ec /src/lib/util/options.c
parentafdbe5c65193f944ac4af55e1b8d0d99fbe768bc (diff)
(MESS) Be a bit more fine-grained in when to mark slot options as internal. (nw)
Diffstat (limited to 'src/lib/util/options.c')
-rw-r--r--src/lib/util/options.c17
1 files changed, 17 insertions, 0 deletions
diff --git a/src/lib/util/options.c b/src/lib/util/options.c
index d89ef85190a..78cab4f08cf 100644
--- a/src/lib/util/options.c
+++ b/src/lib/util/options.c
@@ -153,6 +153,12 @@ void core_options::entry::set_default_value(const char *defvalue)
}
+void core_options::entry::set_flag(UINT32 mask, UINT32 flag)
+{
+ m_flags = ( m_flags & mask ) | flag;
+}
+
+
//-------------------------------------------------
// revert - revert back to our default if we are
// at or below the given priority
@@ -641,6 +647,17 @@ bool core_options::set_value(const char *name, float value, int priority, astrin
}
+void core_options::set_flag(const char *name, UINT32 mask, UINT32 flag)
+{
+ // find the entry first
+ entry *curentry = m_entrymap.find(name);
+ if ( curentry == NULL )
+ {
+ return;
+ }
+ curentry->set_flag(mask, flag);
+}
+
//-------------------------------------------------
// reset - reset the options state, removing
// everything