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
|
||||
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
|
||||
|
|
Loading…
Reference in a new issue