summaryrefslogtreecommitdiff
path: root/src/settings.h
diff options
context:
space:
mode:
authorVito Caputo <vcaputo@pengaru.com>2019-11-15 14:24:54 -0800
committerVito Caputo <vcaputo@pengaru.com>2019-11-15 14:24:54 -0800
commit4177224c95e9922d764562abe25d9bcd2b097c61 (patch)
treeaf8b55898f3efa8296b2a65db8d4b9392d4bfaac /src/settings.h
parent141db86df8710369bd7ae2628e7b7a517e01e845 (diff)
settings: add setting_desc_check() helper
Rudimentary setting value checking against the description. For now it just enforces the multiple-choice stuff, I'm undecided on the regex support for now. It'd just be nice to throw some more informative errors when cli arguments are incorrect for things like fullscreen=yes when it only knows fullscreen=on/off.
Diffstat (limited to 'src/settings.h')
-rw-r--r--src/settings.h1
1 files changed, 1 insertions, 0 deletions
diff --git a/src/settings.h b/src/settings.h
index 26baca7..198f8b6 100644
--- a/src/settings.h
+++ b/src/settings.h
@@ -32,6 +32,7 @@ int settings_apply_desc_generators(const settings_t *settings, const setting_des
int setting_desc_clone(const setting_desc_t *desc, setting_desc_t **res_desc);
void setting_desc_free(setting_desc_t *desc);
+int setting_desc_check(const setting_desc_t *desc, const char *value);
#ifndef SETTINGS_STR
#define _SETTINGS_STR(s) #s
© All Rights Reserved