fixing errors
This commit is contained in:
parent
686b2873a2
commit
528ca22030
2 changed files with 4 additions and 2 deletions
|
@ -127,7 +127,7 @@ withAffection AffectionConfig{..} = do
|
||||||
ad <- get
|
ad <- get
|
||||||
-- Measure time difference form last run
|
-- Measure time difference form last run
|
||||||
now <- liftIO $ getTime Monotonic
|
now <- liftIO $ getTime Monotonic
|
||||||
lastTime <- sysTime ad
|
let lastTime = sysTime ad
|
||||||
-- clean draw requests from last run
|
-- clean draw requests from last run
|
||||||
MP.mapM_ (invalidateDrawRequest (drawStride ad) (drawCPP ad)) (drawStack ad)
|
MP.mapM_ (invalidateDrawRequest (drawStride ad) (drawCPP ad)) (drawStack ad)
|
||||||
-- clean the renderer form last time
|
-- clean the renderer form last time
|
||||||
|
@ -144,7 +144,7 @@ withAffection AffectionConfig{..} = do
|
||||||
evs <- preHandleEvents =<< liftIO SDL.pollEvents
|
evs <- preHandleEvents =<< liftIO SDL.pollEvents
|
||||||
mapM_ eventLoop evs
|
mapM_ eventLoop evs
|
||||||
-- execute user defined update loop
|
-- execute user defined update loop
|
||||||
unless pausedTime (updateLoop dt)
|
unless (pausedTime ad) (updateLoop dt)
|
||||||
-- execute user defined draw loop
|
-- execute user defined draw loop
|
||||||
drawLoop
|
drawLoop
|
||||||
-- handle all new draw requests
|
-- handle all new draw requests
|
||||||
|
|
|
@ -41,6 +41,8 @@ import qualified BABL as B
|
||||||
import Control.Monad.IO.Class
|
import Control.Monad.IO.Class
|
||||||
import Control.Monad.State
|
import Control.Monad.State
|
||||||
import qualified Control.Monad.Parallel as MP
|
import qualified Control.Monad.Parallel as MP
|
||||||
|
|
||||||
|
import System.Clock (TimeSpec)
|
||||||
-- import Control.Monad.Reader
|
-- import Control.Monad.Reader
|
||||||
|
|
||||||
-- import Control.Concurrent.MVar
|
-- import Control.Concurrent.MVar
|
||||||
|
|
Loading…
Reference in a new issue