Don't need separate run/main
This commit is contained in:
+1
-4
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user