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:
1 parent
2de47f0db9
commit
8104955c71
4 files changed
+31
-1
No files matched your search
@@ -21,6 +21,8 @@ def SDL_INIT_CAMERA: UInt32 := 0x00010000
|
||||
def SDL_WINDOW_SHOWN : UInt32 := 0x00000004
|
||||
def SDL_RENDERER_ACCELERATED : UInt32 := 0x00000002
|
||||
def SDL_QUIT : UInt32 := 0x100
|
||||
def SDL_EVENT_CAMERA_DEVICE_APPROVED : UInt32 := 0x1402
|
||||
def SDL_EVENT_CAMERA_DEVICE_DENIED : UInt32 := 0x1403
|
||||
|
||||
def SDL_SCANCODE_W : UInt32 := 26
|
||||
def SDL_SCANCODE_A : UInt32 := 4
|
||||
|
||||
Reference in new issue
Block a user