[vlc-devel] [PATCH 3/7] modules/entry: specify default range for floats

Filip Roséen filip at atch.se
Wed Oct 12 19:39:35 CEST 2016


In order to supply symmetry with integer variables being created, as
well as easy maintanence of relevant parts of the codebase, these
changes initializes the valid range for float-variables.
---
 src/modules/entry.c | 6 ++++++
 1 file changed, 6 insertions(+)

diff --git a/src/modules/entry.c b/src/modules/entry.c
index 3bb312e..ae8e041 100644
--- a/src/modules/entry.c
+++ b/src/modules/entry.c
@@ -29,6 +29,7 @@
 #include <assert.h>
 #include <stdarg.h>
 #include <limits.h>
+#include <float.h>
 
 #include "modules/modules.h"
 #include "config/configuration.h"
@@ -131,6 +132,11 @@ static module_config_t *vlc_config_create (module_t *module, int type)
         tab[confsize].max.i = INT_MAX;
         tab[confsize].min.i = INT_MIN;
     }
+    else if( IsConfigFloatType (type))
+    {
+        tab[confsize].max.f = FLT_MAX;
+        tab[confsize].min.f = FLT_MIN;
+    }
     tab[confsize].i_type = type;
 
     if (CONFIG_ITEM(type))
-- 
2.10.0



More information about the vlc-devel mailing list