mac-capture: Fix issue with desktop capture introduced by macOS 12.5

Initializing a display stream with a content filter which excludes an
empty list of windows leads to a broken stream. Initializing with a list
of all available windows as a workaround re-enables functionality.
This commit is contained in:
PatTheMav 2022-07-25 22:12:32 +02:00 committed by Patrick Heyer
parent 2d2a5cad59
commit 2bea178fb7

View File

@ -376,9 +376,15 @@ static bool init_screen_stream(struct screen_capture *sc)
case ScreenCaptureDisplayStream: {
SCDisplay *target_display = get_target_display();
content_filter = [[SCContentFilter alloc]
initWithDisplay:target_display
excludingWindows:[[NSArray alloc] init]];
if (@available(macOS 13.0, *)) {
content_filter = [[SCContentFilter alloc]
initWithDisplay:target_display
excludingWindows:[[NSArray alloc] init]];
} else {
content_filter = [[SCContentFilter alloc]
initWithDisplay:target_display
includingWindows:sc->shareable_content.windows];
}
set_display_mode(sc, target_display);
} break;