Skip to content

Commit

Permalink
fix single value properties
Browse files Browse the repository at this point in the history
  • Loading branch information
exeldro committed Nov 30, 2020
1 parent daed576 commit 4bcf77d
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 7 deletions.
2 changes: 1 addition & 1 deletion CMakeLists.txt
Original file line number Diff line number Diff line change
@@ -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
Expand Down
17 changes: 11 additions & 6 deletions move-value-filter.c
Original file line number Diff line number Diff line change
Expand Up @@ -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)) {
Expand All @@ -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 {
Expand All @@ -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(
Expand All @@ -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(
Expand All @@ -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))
Expand Down Expand Up @@ -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;
Expand Down

0 comments on commit 4bcf77d

Please sign in to comment.