浏览代码

mac-capture: Don't show apps with empty name in SCK

SCK's application list has one entry with empty name and bundle ID which
belongs to WindowServer. This is not worth exposing since an empty entry
would confuse users and nothing would get captured if selected.
gxalpha 3 年之前
父节点
当前提交
b72f15dcef
共有 1 个文件被更改,包括 3 次插入2 次删除
  1. 3 2
      plugins/mac-capture/mac-screen-capture.m

+ 3 - 2
plugins/mac-capture/mac-screen-capture.m

@@ -928,8 +928,9 @@ static bool build_application_list(struct screen_capture *sc,
 				[application.applicationName UTF8String];
 			const char *bundle_id =
 				[application.bundleIdentifier UTF8String];
-			obs_property_list_add_string(application_list, name,
-						     bundle_id);
+			if (strcmp(name, "") != 0)
+				obs_property_list_add_string(application_list,
+							     name, bundle_id);
 		}];
 
 	os_sem_post(sc->shareable_content_available);