Skip to content

Commit

Permalink
Update: cleary some code style
Browse files Browse the repository at this point in the history
  • Loading branch information
vcaesar committed Sep 17, 2024
1 parent 5b9871b commit cb51e2a
Showing 1 changed file with 9 additions and 6 deletions.
15 changes: 9 additions & 6 deletions screen/screengrab_c.h
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,7 @@
dispatch_semaphore_signal(semaphore);
return;
}

SCDisplay* target = nil;
for (SCDisplay *display in content.displays) {
if (display.displayID == id) {
Expand All @@ -41,16 +42,18 @@
config.sourceRect = diIntersectDisplayLocal;
config.width = diIntersectDisplayLocal.size.width;
config.height = diIntersectDisplayLocal.size.height;

[SCScreenshotManager captureImageWithFilter:filter
configuration:config
completionHandler:^(CGImageRef img, NSError* error) {
if (!error) {
image1 = CGImageCreateCopyWithColorSpace(img, colorSpace);
}
dispatch_semaphore_signal(semaphore);
configuration:config
completionHandler:^(CGImageRef img, NSError* error) {
if (!error) {
image1 = CGImageCreateCopyWithColorSpace(img, colorSpace);
}
dispatch_semaphore_signal(semaphore);
}];
}
}];

dispatch_semaphore_wait(semaphore, DISPATCH_TIME_FOREVER);
dispatch_release(semaphore);
return image1;
Expand Down

0 comments on commit cb51e2a

Please sign in to comment.