This commit is contained in:
KingKDot
2026-03-06 11:48:05 -06:00
parent ca2161ebe7
commit 5133268411
2 changed files with 21 additions and 1 deletions
+8 -1
View File
@@ -216,7 +216,14 @@ func captureAllDisplaysAndSend(ctx context.Context, env *rt.Env) error {
}
func supportsCapture() bool {
return safeDisplayCount() > 0
return safeActiveDisplays() > 0
}
func safeActiveDisplays() int {
defer func() {
_ = recover()
}()
return activeDisplays()
}
func safeCaptureDisplay(display int) (*image.RGBA, error) {