From 34cac097d15cdd7ef0a0de8b9024db9acfe8618d Mon Sep 17 00:00:00 2001
From: 3gg <3gg@shellblade.net>
Date: Mon, 30 Dec 2024 12:48:31 -0800
Subject: Move window setup to App.

---
 Demos/Pong/Main.hs | 9 ++++-----
 1 file changed, 4 insertions(+), 5 deletions(-)

(limited to 'Demos')

diff --git a/Demos/Pong/Main.hs b/Demos/Pong/Main.hs
index 66fa223..de8e6f2 100644
--- a/Demos/Pong/Main.hs
+++ b/Demos/Pong/Main.hs
@@ -26,14 +26,13 @@ data GameState = GameState
   , world           :: [GameObject]
   }
 
+options = defaultAppOptions { title = "Pong" }
 
-app = App defaultAppOptions step render resize
+app = App options initGame endGame step render resize
 
 
-main =
-  withWindow (1920, 1200) (Just "Pong") initGame endGame $
-    loop app
-
+main :: IO ()
+main = runApp app
 
 initGame :: Window -> Game () GameState
 initGame window = do
-- 
cgit v1.2.3