moving time initialization after window creation
This commit is contained in:
parent
aeb814a86a
commit
f544b5f025
1 changed files with 2 additions and 2 deletions
|
@ -64,8 +64,6 @@ withAffection AffectionConfig{..} = do
|
||||||
renderQuality <- SDL.get SDL.HintRenderScaleQuality
|
renderQuality <- SDL.get SDL.HintRenderScaleQuality
|
||||||
when (renderQuality /= SDL.ScaleLinear) $
|
when (renderQuality /= SDL.ScaleLinear) $
|
||||||
putStrLn "Warning: Linear texture filtering not enabled!"
|
putStrLn "Warning: Linear texture filtering not enabled!"
|
||||||
-- get current time
|
|
||||||
execTime <- newIORef =<< getTime Monotonic
|
|
||||||
-- construct window
|
-- construct window
|
||||||
window <- SDL.createWindow windowTitle windowConfig
|
window <- SDL.createWindow windowTitle windowConfig
|
||||||
SDL.showWindow window
|
SDL.showWindow window
|
||||||
|
@ -116,6 +114,8 @@ withAffection AffectionConfig{..} = do
|
||||||
, elapsedTime = 0
|
, elapsedTime = 0
|
||||||
, deltaTime = 0
|
, deltaTime = 0
|
||||||
}) <$> loadState
|
}) <$> loadState
|
||||||
|
-- get current time
|
||||||
|
execTime <- newIORef =<< getTime Monotonic
|
||||||
(_, nState) <- runStateT ( A.runState $ do
|
(_, nState) <- runStateT ( A.runState $ do
|
||||||
preLoop
|
preLoop
|
||||||
whileM_ (do
|
whileM_ (do
|
||||||
|
|
Loading…
Reference in a new issue