summaryrefslogtreecommitdiff
path: root/src/conf.c
diff options
context:
space:
mode:
authorAlfred E. Heggestad <alfred.heggestad@gmail.com>2018-02-25 13:45:13 +0100
committerAlfred E. Heggestad <alfred.heggestad@gmail.com>2018-02-25 13:45:13 +0100
commit9780a6260a226f2c19673284730c25d381db074d (patch)
treeda0d6e3031cc6f697060b4c06d43e2860f456619 /src/conf.c
parent59d29c0254b9240a00ac9236cc8e92c0ae65ec8a (diff)
video: change video_fps from int to double float
Diffstat (limited to 'src/conf.c')
-rw-r--r--src/conf.c18
1 files changed, 18 insertions, 0 deletions
diff --git a/src/conf.c b/src/conf.c
index 2046216..2bb7d5a 100644
--- a/src/conf.c
+++ b/src/conf.c
@@ -289,6 +289,24 @@ int conf_get_sa(const struct conf *conf, const char *name, struct sa *sa)
}
+int conf_get_float(const struct conf *conf, const char *name, double *val)
+{
+ struct pl opt;
+ int err;
+
+ if (!conf || !name || !val)
+ return EINVAL;
+
+ err = conf_get(conf, name, &opt);
+ if (err)
+ return err;
+
+ *val = pl_float(&opt);
+
+ return 0;
+}
+
+
/**
* Configure the system with default settings
*