aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorHanspeter Portner <dev@open-music-kontrollers.ch>2017-05-09 22:47:03 +0200
committerHanspeter Portner <dev@open-music-kontrollers.ch>2017-05-09 22:47:03 +0200
commit8319673d4916eeb5e8537f55680185243bf58ced (patch)
tree034ac6bcf53221d4e40a2f4801b3c73b95d60922
parentc537f9db3fd2e34df6cd9de08af6661fa0bcb815 (diff)
downloadsynthpod-8319673d4916eeb5e8537f55680185243bf58ced.tar.xz
nk: initialize boolean prameters to (0,1).
-rw-r--r--VERSION2
-rw-r--r--plugins/synthpod_common_nk.c11
2 files changed, 12 insertions, 1 deletions
diff --git a/VERSION b/VERSION
index 53e21855..7a43dfb4 100644
--- a/VERSION
+++ b/VERSION
@@ -1 +1 @@
-0.1.4929
+0.1.4931
diff --git a/plugins/synthpod_common_nk.c b/plugins/synthpod_common_nk.c
index b3f4dd5a..e1ff1046 100644
--- a/plugins/synthpod_common_nk.c
+++ b/plugins/synthpod_common_nk.c
@@ -1253,6 +1253,12 @@ _param_fill(plughandle_t *handle, param_t *param, const LilvNode *param_node)
if(param->range)
{
+ if(param->range == handle->forge.Bool)
+ {
+ param->min.b = 0;
+ param->max.b = 1;
+ }
+
LilvNode *min = lilv_world_get(handle->world, param_node, handle->node.lv2_minimum, NULL);
if(min)
{
@@ -1727,6 +1733,11 @@ _mod_nk_write_function(plughandle_t *handle, mod_t *src_mod, port_t *src_port,
param->range = ((const LV2_Atom_URID *)&prop->value)->body;
if(param->range == handle->forge.String)
nk_textedit_init_default(&param->val.editor);
+ else if(param->range == handle->forge.Bool)
+ {
+ param->min.b = 0;
+ param->min.b = 1;
+ }
}
else if( (prop->key == handle->regs.rdfs.label.urid)
&& (prop->value.type == handle->forge.String) )