File tree Expand file tree Collapse file tree 1 file changed +9
-6
lines changed Expand file tree Collapse file tree 1 file changed +9
-6
lines changed Original file line number Diff line number Diff line change 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 ) {
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 ;
You can’t perform that action at this time.
0 commit comments