Fixes #4438: wrong cast used when setting Lua mixer script input source (#4470)

* Fixes #4438: wrong cast used when setting Lua mixer script input source
Improved parsing of Lua mixer script inputs

* Additional type check

* ScriptDataInput union introduced.
Fixed: when using SOURCE input, do not use default value
Fixed: when using SOURCE input, min-max range is fixed
This commit is contained in:
Damjan Adamic
2017-02-21 10:59:47 +01:00
committed by Bertrand Songis
parent 177acb95e5
commit f36d01d560
7 changed files with 65 additions and 35 deletions
+7
View File
@@ -69,6 +69,13 @@ void luaInitThemesAndWidgets();
#define RUN_TELEM_FG_SCRIPT (1 << 3)
#define RUN_STNDAL_SCRIPT (1 << 4)
enum luaScriptInputType {
INPUT_TYPE_FIRST = 0,
INPUT_TYPE_VALUE = INPUT_TYPE_FIRST,
INPUT_TYPE_SOURCE,
INPUT_TYPE_LAST = INPUT_TYPE_SOURCE
};
struct ScriptInput {
const char *name;
uint8_t type;