Skip to content

Commit 2ac823f

Browse files
authored
Fix: Allow capturing non-primary macOS displays (#1530)
1 parent 866e12b commit 2ac823f

2 files changed

Lines changed: 7 additions & 0 deletions

File tree

CHANGELOG.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,7 @@
66
- Integrate SignPath for automated Windows code signing (#1479) - v22beta2 🆕
77
- Add Philips WiZ support (driver + web wizard) Thanks @user83749 (#1469) - v22beta2 🆕
88
- Add aspect ratio detection for Amlogic grabber. Thanks @santievil (#1476) - v22beta2 🆕
9+
- Fix: Allow capturing non-primary macOS displays (#1530) - v22beta2 🆕
910
- Fix remote tab JSON parsing error caused by missing black color in API JSON scheme (#1471) - v22beta2 🆕
1011
- Implement DDP / Hyperk drivers (#1467) - v22beta2 🆕
1112
- Prepare support for RP2350 in HyperSerialPico integration (#1521) - v22beta2 🆕

sources/grabber/osx/macOS/macOsGrabber.mm

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -304,6 +304,7 @@
304304
streamConfig.width = displayBounds.size.width * scaleAspect;
305305
streamConfig.height = displayBounds.size.height * scaleAspect;
306306
streamConfig.sourceRect = displayBounds;
307+
streamConfig.sourceRect = CGRectMake(0, 0, displayBounds.size.width, displayBounds.size.height);
307308
streamConfig.captureResolution = SCCaptureResolutionBest;
308309
streamConfig.scalesToFit = false;
309310
streamConfig.queueDepth = 1;
@@ -320,6 +321,11 @@
320321

321322
CGImageRelease(capturedImage);
322323
}
324+
else if (error)
325+
{
326+
QString errorMessage = QString::fromNSString([error localizedDescription]);
327+
Error(_log, "captureImageWithFilter Error: {:s}", errorMessage);
328+
}
323329
}
324330
];
325331

0 commit comments

Comments
 (0)