Skip to content

Commit

Permalink
Move show when moving up or down
Browse files Browse the repository at this point in the history
  • Loading branch information
exeldro committed Mar 20, 2024
1 parent 3c4c851 commit 6d48052
Showing 1 changed file with 8 additions and 0 deletions.
8 changes: 8 additions & 0 deletions nvidia-move-filter.c
Original file line number Diff line number Diff line change
Expand Up @@ -2279,6 +2279,10 @@ static bool nv_move_move_up_clicked(obs_properties_t *props,
return false;
obs_data_t *settings = obs_source_get_settings(filter->source);
swap_action(settings, action_number, action_number - 1);
long long show = obs_data_get_int(settings, "show");
if (show == action_number) {
obs_data_set_int(settings, "show", show - 1);
}
nv_move_actions_changed(data, props,
obs_properties_get(props, "actions"), settings);
obs_data_release(settings);
Expand All @@ -2297,6 +2301,10 @@ static bool nv_move_move_down_clicked(obs_properties_t *props,

obs_data_t *settings = obs_source_get_settings(filter->source);
swap_action(settings, action_number, action_number + 1);
long long show = obs_data_get_int(settings, "show");
if (show == action_number) {
obs_data_set_int(settings, "show", show + 1);
}
nv_move_actions_changed(data, props,
obs_properties_get(props, "actions"), settings);
obs_data_release(settings);
Expand Down

0 comments on commit 6d48052

Please sign in to comment.