From 528ca220307fa2652a4f3a12a439bbd46985a570 Mon Sep 17 00:00:00 2001 From: nek0 Date: Sat, 29 Jul 2017 02:51:18 +0200 Subject: [PATCH] fixing errors --- src/Affection.hs | 4 ++-- src/Affection/Types.hs | 2 ++ 2 files changed, 4 insertions(+), 2 deletions(-) diff --git a/src/Affection.hs b/src/Affection.hs index 4003009..fbec434 100644 --- a/src/Affection.hs +++ b/src/Affection.hs @@ -127,7 +127,7 @@ withAffection AffectionConfig{..} = do ad <- get -- Measure time difference form last run now <- liftIO $ getTime Monotonic - lastTime <- sysTime ad + let lastTime = sysTime ad -- clean draw requests from last run MP.mapM_ (invalidateDrawRequest (drawStride ad) (drawCPP ad)) (drawStack ad) -- clean the renderer form last time @@ -144,7 +144,7 @@ withAffection AffectionConfig{..} = do evs <- preHandleEvents =<< liftIO SDL.pollEvents mapM_ eventLoop evs -- execute user defined update loop - unless pausedTime (updateLoop dt) + unless (pausedTime ad) (updateLoop dt) -- execute user defined draw loop drawLoop -- handle all new draw requests diff --git a/src/Affection/Types.hs b/src/Affection/Types.hs index be4effb..9638d4d 100644 --- a/src/Affection/Types.hs +++ b/src/Affection/Types.hs @@ -41,6 +41,8 @@ import qualified BABL as B import Control.Monad.IO.Class import Control.Monad.State import qualified Control.Monad.Parallel as MP + +import System.Clock (TimeSpec) -- import Control.Monad.Reader -- import Control.Concurrent.MVar