Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Commit cb51e2a

Browse files
committed
Update: cleary some code style
1 parent 5b9871b commit cb51e2a

File tree

1 file changed

+9
-6
lines changed

1 file changed

+9
-6
lines changed

screen/screengrab_c.h

Lines changed: 9 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -24,6 +24,7 @@
2424
dispatch_semaphore_signal(semaphore);
2525
return;
2626
}
27+
2728
SCDisplay* target = nil;
2829
for (SCDisplay *display in content.displays) {
2930
if (display.displayID == id) {
@@ -41,16 +42,18 @@
4142
config.sourceRect = diIntersectDisplayLocal;
4243
config.width = diIntersectDisplayLocal.size.width;
4344
config.height = diIntersectDisplayLocal.size.height;
45+
4446
[SCScreenshotManager captureImageWithFilter:filter
45-
configuration:config
46-
completionHandler:^(CGImageRef img, NSError* error) {
47-
if (!error) {
48-
image1 = CGImageCreateCopyWithColorSpace(img, colorSpace);
49-
}
50-
dispatch_semaphore_signal(semaphore);
47+
configuration:config
48+
completionHandler:^(CGImageRef img, NSError* error) {
49+
if (!error) {
50+
image1 = CGImageCreateCopyWithColorSpace(img, colorSpace);
51+
}
52+
dispatch_semaphore_signal(semaphore);
5153
}];
5254
}
5355
}];
56+
5457
dispatch_semaphore_wait(semaphore, DISPATCH_TIME_FOREVER);
5558
dispatch_release(semaphore);
5659
return image1;

0 commit comments

Comments
 (0)