From 121c9fb1202a103766d960ea7dbdb5983c1589ef Mon Sep 17 00:00:00 2001 From: nek0 Date: Wed, 29 Mar 2017 00:46:03 +0200 Subject: [PATCH] to parallel and not to parallel --- src/Affection.hs | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) diff --git a/src/Affection.hs b/src/Affection.hs index a2266f2..430d57b 100644 --- a/src/Affection.hs +++ b/src/Affection.hs @@ -128,7 +128,7 @@ withAffection AffectionConfig{..} = do -- get state ad <- get -- clean draw requests from last run - mapM_ (invalidateDrawRequest (drawStride ad) (drawCPP ad)) (drawStack ad) + MP.mapM_ (invalidateDrawRequest (drawStride ad) (drawCPP ad)) (drawStack ad) -- clean the renderer form last time -- SDL.clear renderer -- compute dt and update elapsedTime @@ -141,7 +141,7 @@ withAffection AffectionConfig{..} = do } -- poll events evs <- preHandleEvents =<< liftIO SDL.pollEvents - MP.mapM_ eventLoop evs + mapM_ eventLoop evs -- execute user defined update loop updateLoop dt -- execute user defined draw loop @@ -149,12 +149,11 @@ withAffection AffectionConfig{..} = do -- handle all new draw requests ad2 <- get clear <- catMaybes <$> - mapM (handleDrawRequest (drawStride ad) (drawCPP ad)) (drawStack ad2) + MP.mapM (handleDrawRequest (drawStride ad) (drawCPP ad)) (drawStack ad2) -- save all draw requests to clear in next run put $ ad2 { drawStack = clear } -- actual drawing - -- SDL.copy (windowRenderer ad2) texture Nothing Nothing SDL.present (windowRenderer ad2) -- save new time liftIO $ writeIORef execTime now