Skip to content

Record your screen, ship a demo. Free and open-source, GPU-accelerated, no watermarks, no subscriptions. Windows, macOS, Linux. Actively maintained.

fix: relax cursor capture helper validation

EtienneLescot0d3c4df45365
diff --git a/scripts/test-windows-wgc-helper.mjs b/scripts/test-windows-wgc-helper.mjs
index 7521877e3..53cea19a6 100644
--- a/scripts/test-windows-wgc-helper.mjs
+++ b/scripts/test-windows-wgc-helper.mjs
@@ -318,7 +318,11 @@ const nativeMicrophoneDiagnostics = result.stderr
if (!hasVideo) {
throw new Error(`WGC helper output has no video stream: ${outputPath}`);
}
-if (!cursorCapture || cursorCapture.requested !== CAPTURE_CURSOR || cursorCapture.applied !== CAPTURE_CURSOR) {
+if (
+ (CAPTURE_CURSOR && !cursorCapture) ||
+ (cursorCapture &&
+ (cursorCapture.requested !== CAPTURE_CURSOR || cursorCapture.applied !== CAPTURE_CURSOR))
+) {
throw new Error(
`WGC helper did not apply requested cursor capture mode (${CAPTURE_CURSOR}): ${result.stdout}`,
);