diff --git a/WebcamApp.lean b/WebcamApp.lean index a6199b0..40af393 100644 --- a/WebcamApp.lean +++ b/WebcamApp.lean @@ -63,7 +63,7 @@ partial def webcamLoop (stateRef: IO.Ref WebcamState): IO Unit := do if state.running then webcamLoop stateRef -def run : IO Unit := do +def main : IO Unit := do unless (← SDL.init (SDL.SDL_INIT_VIDEO ||| SDL.SDL_INIT_CAMERA)) == 1 do IO.println "Failed to initialize SDL" return @@ -108,6 +108,3 @@ def run : IO Unit := do IO.println "Starting webcam loop..." webcamLoop stateRef SDL.quit - -def main : IO Unit := - run