From f544b5f025ce955471ba4247ce73e6ed7a07659b Mon Sep 17 00:00:00 2001 From: nek0 Date: Sat, 29 Jul 2017 02:19:48 +0200 Subject: [PATCH] moving time initialization after window creation --- src/Affection.hs | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/Affection.hs b/src/Affection.hs index 6a71530..15da2fa 100644 --- a/src/Affection.hs +++ b/src/Affection.hs @@ -64,8 +64,6 @@ withAffection AffectionConfig{..} = do renderQuality <- SDL.get SDL.HintRenderScaleQuality when (renderQuality /= SDL.ScaleLinear) $ putStrLn "Warning: Linear texture filtering not enabled!" - -- get current time - execTime <- newIORef =<< getTime Monotonic -- construct window window <- SDL.createWindow windowTitle windowConfig SDL.showWindow window @@ -116,6 +114,8 @@ withAffection AffectionConfig{..} = do , elapsedTime = 0 , deltaTime = 0 }) <$> loadState + -- get current time + execTime <- newIORef =<< getTime Monotonic (_, nState) <- runStateT ( A.runState $ do preLoop whileM_ (do