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