From d1c697c204cd607f9f96008dbcb8d4383134c23e Mon Sep 17 00:00:00 2001 From: nek0 Date: Tue, 20 Dec 2016 05:27:35 +0100 Subject: [PATCH] fixing my stupidity --- src/Affection.hs | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/src/Affection.hs b/src/Affection.hs index 9ff09b9..f0c0d93 100644 --- a/src/Affection.hs +++ b/src/Affection.hs @@ -88,13 +88,14 @@ withAffection AffectionConfig{..} = do updateLoop $ (fromIntegral $ toNanoSecs $ diffTimeSpec lastTime now) / (fromIntegral 10 ^ 9) -- handle all new draw requests - clear <- catMaybes <$> mapM (handleDrawRequest pixels format stride cpp) (drawStack ad) + ad2 <- get + clear <- catMaybes <$> mapM (handleDrawRequest pixels format stride cpp) (drawStack ad2) -- save all draw requests to clear in next run - put $ ad + put $ ad2 { drawStack = clear } -- blit surface and update window liftIO $ SDL.surfaceBlit surface Nothing oldSurf Nothing - liftIO $ SDL.updateWindowSurface $ drawWindow ad + liftIO $ SDL.updateWindowSurface $ drawWindow ad2 -- save new time _ <- liftIO $ swapMVar execTime $ now return ()