From 6db1bf509bc76b1c811608d9cc4fbe7d1109131e Mon Sep 17 00:00:00 2001 From: Exeldro Date: Mon, 29 Jun 2020 07:40:58 +0200 Subject: [PATCH] support enabling next move --- move-source-filter.c | 16 +++++++++++++--- move-value-filter.c | 16 +++++++++++++--- 2 files changed, 26 insertions(+), 6 deletions(-) diff --git a/move-source-filter.c b/move-source-filter.c index c331f34..4cead32 100644 --- a/move-source-filter.c +++ b/move-source-filter.c @@ -1127,9 +1127,19 @@ void move_source_tick(void *data, float seconds) filter), MOVE_SOURCE_FILTER_ID) == 0) { - move_source_start( - obs_obj_get_data( - filter)); + struct move_source_info + *filter_data = + obs_obj_get_data( + filter); + if (move_source->start_trigger == + START_TRIGGER_ENABLE_DISABLE && + !obs_source_enabled( + filter_data->source)) + obs_source_set_enabled( + filter_data + ->source, + true); + move_source_start(filter_data); } } } diff --git a/move-value-filter.c b/move-value-filter.c index 882ec99..ec13d13 100644 --- a/move-value-filter.c +++ b/move-value-filter.c @@ -714,9 +714,19 @@ void move_value_tick(void *data, float seconds) strcmp(obs_source_get_unversioned_id( filter), MOVE_VALUE_FILTER_ID) == 0) { - move_value_start( - obs_obj_get_data( - filter)); + struct move_value_info + *filter_data = + obs_obj_get_data( + filter); + if (move_value->start_trigger == + START_TRIGGER_ENABLE_DISABLE && + !obs_source_enabled( + filter_data->source)) + obs_source_set_enabled( + filter_data + ->source, + true); + move_value_start(filter_data); } } }