Merge pull request #82 from VoidGravity/fix/windows10-wgc-border-crash

Fix/windows10 wgc border crash
This commit is contained in:
webadderall authored and GitHub committed 2026-03-21 10:47:52 +11:00
commit c690c62e7b
1 file changed
+6 -1
@@ -124,7 +124,12 @@ bool WgcSession::initializeWithItem(int fps) {
session_ = framePool_.CreateCaptureSession(captureItem_);
session_.IsCursorCaptureEnabled(false);
session_.IsBorderRequired(false);
// IsBorderRequired is only available on Windows 11+ (build 22000). propagating an hresult_error results in Native Windows capture failure
try {
session_.IsBorderRequired(false);
} catch (winrt::hresult_error const& e) {
}
return true;
}