fixing errors

This commit is contained in:
nek0 2017-07-29 02:51:18 +02:00
parent 686b2873a2
commit 528ca22030
2 changed files with 4 additions and 2 deletions

View file

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

View file

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