Răsfoiți Sursa

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 ani în urmă
părinte
comite
b72f15dcef
1 a modificat fișierele cu 3 adăugiri și 2 ștergeri
  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);