From edb386eb1edaed1661089064bab57c8d39c52a15 Mon Sep 17 00:00:00 2001 From: Chris Robinson Date: Mon, 19 Sep 2011 11:29:18 -0700 Subject: Add a ConfigValueStr function, to return the string through a parameter --- Alc/alcConfig.c | 9 +++++++++ 1 file changed, 9 insertions(+) (limited to 'Alc/alcConfig.c') diff --git a/Alc/alcConfig.c b/Alc/alcConfig.c index 60fb733a..0024b948 100644 --- a/Alc/alcConfig.c +++ b/Alc/alcConfig.c @@ -313,6 +313,15 @@ int ConfigValueExists(const char *blockName, const char *keyName) return !!val[0]; } +int ConfigValueStr(const char *blockName, const char *keyName, const char **ret) +{ + const char *val = GetConfigValue(blockName, keyName, ""); + if(!val[0]) return 0; + + *ret = val; + return 1; +} + int ConfigValueInt(const char *blockName, const char *keyName, int *ret) { const char *val = GetConfigValue(blockName, keyName, ""); -- cgit v1.2.3