moving time initialization after window creation

This commit is contained in:
nek0 2017-07-29 02:19:48 +02:00
parent aeb814a86a
commit f544b5f025

View file

@ -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