Browse Source

linux-jack: Prepend devices with "OBS Studio: "

This makes it more clear that the device belongs to OBS.
Fixes #7988
univrsal 2 năm trước cách đây
mục cha
commit
cddf69d69f
1 tập tin đã thay đổi với 7 bổ sung1 xóa
  1. 7 1
      plugins/linux-jack/jack-input.c

+ 7 - 1
plugins/linux-jack/jack-input.c

@@ -18,6 +18,7 @@ along with this program.  If not, see <http://www.gnu.org/licenses/>.
 #include "jack-wrapper.h"
 
 #include <obs-module.h>
+#include <util/dstr.h>
 
 /**
  * Returns the name of the plugin
@@ -76,8 +77,13 @@ static void jack_update(void *vptr, obs_data_t *settings)
 	if (!data->device || strcmp(data->device, new_device) != 0) {
 		if (data->device)
 			bfree(data->device);
-		data->device = bstrdup(new_device);
+		/* prefix all devices to make it clear that they belong to obs */
+		struct dstr device;
+		dstr_init(&device);
+		dstr_catf(&device, "OBS Studio: %s", new_device);
+		data->device = bstrdup(device.array);
 		settings_changed = true;
+		dstr_free(&device);
 	}
 
 	if (settings_changed) {