From 38b87d9e43015b4e2f42720692792a7346270073 Mon Sep 17 00:00:00 2001 From: dimtpap Date: Sun, 6 Oct 2024 22:38:32 +0300 Subject: [PATCH] Fix selections not saving if added via the button --- src/pipewire-audio-capture-app.c | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/src/pipewire-audio-capture-app.c b/src/pipewire-audio-capture-app.c index 8c2f592..fa84f86 100644 --- a/src/pipewire-audio-capture-app.c +++ b/src/pipewire-audio-capture-app.c @@ -784,6 +784,12 @@ static bool add_app_clicked(obs_properties_t *properties, obs_property_t *proper const char *app_to_add = obs_data_get_string(settings, SETTING_AVAILABLE_APPS); obs_data_array_t *selections = obs_data_get_array(settings, SETTING_SELECTION_MULTIPLE); + if (obs_data_array_count(selections) == 0) { + obs_data_array_release(selections); + + selections = obs_data_array_create(); + obs_data_set_array(settings, SETTING_SELECTION_MULTIPLE, selections); + } /* Don't add if selection is already in the list */