Make the webcam demo run on macOS

Lean runs main on a helper thread, which Cocoa rejects for video init;
export LEAN_MAIN_USE_THREAD=0 from the justfile on macOS. Wait for the
camera permission event before reading the camera format, since SDL
grants access asynchronously.

Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
This commit is contained in:
Greg ShuflinandClaude Fable 5.1 committed 2026-09-08 15:26:20 -07:00
1 parent 2de47f0db9
commit 8104955c71
4 files changed
+31 -1

No files matched your search

+3
View File
@@ -1,3 +1,6 @@
# Lean runs `main` on a helper thread by default; Cocoa only creates a video device on the main thread.
export LEAN_MAIN_USE_THREAD := if os() == "macos" { "0" } else { "1" }
_default:
@just --list