From 3dd335f46d5427a4f4a46045f09fec12d61b02cc Mon Sep 17 00:00:00 2001 From: Wilbert Pol Date: Wed, 27 Feb 2013 21:41:49 +0000 Subject: (MESS) Be a bit more fine-grained in when to mark slot options as internal. (nw) --- src/lib/util/options.c | 17 +++++++++++++++++ 1 file changed, 17 insertions(+) (limited to 'src/lib/util/options.c') 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 -- cgit v1.2.3-70-g09d2