Skip to content

Commit

Permalink
more logging for capture error
Browse files Browse the repository at this point in the history
  • Loading branch information
summeroff committed Oct 29, 2024
1 parent 17d526d commit cab8585
Showing 1 changed file with 12 additions and 0 deletions.
12 changes: 12 additions & 0 deletions plugins/mac-capture/mac-screen-capture.m
Original file line number Diff line number Diff line change
Expand Up @@ -400,6 +400,18 @@ static bool init_screen_stream(struct screen_capture *sc)
return target_display;
};

void (^set_display_mode)(struct screen_capture *, SCDisplay *) = ^void(
struct screen_capture *capture_data,
SCDisplay *target_display) {
CGDisplayModeRef display_mode =
CGDisplayCopyDisplayMode(target_display.displayID);
[capture_data->stream_properties
setWidth:CGDisplayModeGetPixelWidth(display_mode)];
[capture_data->stream_properties
setHeight:CGDisplayModeGetPixelHeight(display_mode)];
CGDisplayModeRelease(display_mode);
};

MACCAP_LOG(LOG_WARNING, "Capture type: %d", sc->capture_type);
switch (sc->capture_type) {
case ScreenCaptureDisplayStream: {
Expand Down

0 comments on commit cab8585

Please sign in to comment.