aboutsummaryrefslogtreecommitdiffstats
path: root/Alc/alcConfig.c
diff options
context:
space:
mode:
authorChris Robinson <[email protected]>2009-12-28 13:08:15 -0800
committerChris Robinson <[email protected]>2009-12-28 13:08:15 -0800
commit69ab93a8240d6272c3fbd86e65b7baca516ec8de (patch)
tree6d257345dc5eee5dd6a8324ce774aa18b7890e50 /Alc/alcConfig.c
parent179b660eee8cfc958057cb237019a939c3361fbb (diff)
Add a function to check if a config option is set to a non-empty value
Diffstat (limited to 'Alc/alcConfig.c')
-rw-r--r--Alc/alcConfig.c6
1 files changed, 6 insertions, 0 deletions
diff --git a/Alc/alcConfig.c b/Alc/alcConfig.c
index eee64845..dbdf9639 100644
--- a/Alc/alcConfig.c
+++ b/Alc/alcConfig.c
@@ -294,6 +294,12 @@ const char *GetConfigValue(const char *blockName, const char *keyName, const cha
return def;
}
+int ConfigValueExists(const char *blockName, const char *keyName)
+{
+ const char *val = GetConfigValue(blockName, keyName, "");
+ return !!val[0];
+}
+
int GetConfigValueInt(const char *blockName, const char *keyName, int def)
{
const char *val = GetConfigValue(blockName, keyName, "");