From 4bcf77dccf478818ba421a743e5d917fb8f36fe7 Mon Sep 17 00:00:00 2001 From: Exeldro Date: Mon, 30 Nov 2020 11:40:57 +0100 Subject: [PATCH] fix single value properties --- CMakeLists.txt | 2 +- move-value-filter.c | 17 +++++++++++------ 2 files changed, 12 insertions(+), 7 deletions(-) diff --git a/CMakeLists.txt b/CMakeLists.txt index d428468..7b61eb3 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -1,4 +1,4 @@ -project(move-transition VERSION 2.1.1) +project(move-transition VERSION 2.1.2) set(PROJECT_FULL_NAME "Move Transition") set(move-transition_HEADERS diff --git a/move-value-filter.c b/move-value-filter.c index 75bc1ed..2826bd2 100644 --- a/move-value-filter.c +++ b/move-value-filter.c @@ -546,7 +546,8 @@ bool move_value_get_values(obs_properties_t *props, obs_property_t *property, } void copy_properties(obs_properties_t *props_from, obs_properties_t *props_to, - obs_data_t *data_from, obs_data_t *data_to) + obs_data_t *data_from, obs_data_t *data_to, + obs_property_t *setting_list) { obs_property_t *prop_from = obs_properties_first(props_from); for (; prop_from != NULL; obs_property_next(&prop_from)) { @@ -560,7 +561,8 @@ void copy_properties(obs_properties_t *props_from, obs_properties_t *props_to, if (prop_type == OBS_PROPERTY_GROUP) { obs_properties_t *group_to = obs_properties_create(); copy_properties(obs_property_group_content(prop_from), - group_to, data_from, data_to); + group_to, data_from, data_to, + setting_list); if (obs_properties_first(group_to) == NULL) { obs_properties_destroy(group_to); } else { @@ -571,7 +573,8 @@ void copy_properties(obs_properties_t *props_from, obs_properties_t *props_to, } } else if (prop_type == OBS_PROPERTY_INT) { - + obs_property_list_add_string(setting_list, description, + name); if (obs_property_int_type(prop_from) == OBS_NUMBER_SLIDER) { prop_to = obs_properties_add_int_slider( @@ -595,7 +598,8 @@ void copy_properties(obs_properties_t *props_from, obs_properties_t *props_to, prop_to, obs_property_int_suffix(prop_from)); } else if (prop_type == OBS_PROPERTY_FLOAT) { - + obs_property_list_add_string(setting_list, description, + name); if (obs_property_float_type(prop_from) == OBS_NUMBER_SLIDER) { prop_to = obs_properties_add_float_slider( @@ -618,7 +622,8 @@ void copy_properties(obs_properties_t *props_from, obs_properties_t *props_to, obs_property_float_set_suffix( prop_to, obs_property_float_suffix(prop_from)); } else if (prop_type == OBS_PROPERTY_COLOR) { - + obs_property_list_add_string(setting_list, description, + name); prop_to = obs_properties_add_color(props_to, name, description); if (obs_data_has_default_value(data_from, name)) @@ -673,7 +678,7 @@ bool move_value_filter_changed(void *data, obs_properties_t *props, obs_properties_t *sps = obs_source_properties(source); - copy_properties(sps, g, s, settings); + copy_properties(sps, g, s, settings, p); obs_data_release(s); return refresh;