fixing my stupidity

This commit is contained in:
nek0 2016-12-20 05:27:35 +01:00
parent fc67e752ed
commit d1c697c204
1 changed files with 4 additions and 3 deletions

View File

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