fixing my stupidity

This commit is contained in:
nek0 2016-12-20 05:27:35 +01:00
parent fc67e752ed
commit d1c697c204

View file

@ -88,13 +88,14 @@ withAffection AffectionConfig{..} = do
updateLoop $ (fromIntegral $ toNanoSecs $ diffTimeSpec lastTime now) / updateLoop $ (fromIntegral $ toNanoSecs $ diffTimeSpec lastTime now) /
(fromIntegral 10 ^ 9) (fromIntegral 10 ^ 9)
-- handle all new draw requests -- 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 -- save all draw requests to clear in next run
put $ ad put $ ad2
{ drawStack = clear } { drawStack = clear }
-- blit surface and update window -- blit surface and update window
liftIO $ SDL.surfaceBlit surface Nothing oldSurf Nothing liftIO $ SDL.surfaceBlit surface Nothing oldSurf Nothing
liftIO $ SDL.updateWindowSurface $ drawWindow ad liftIO $ SDL.updateWindowSurface $ drawWindow ad2
-- save new time -- save new time
_ <- liftIO $ swapMVar execTime $ now _ <- liftIO $ swapMVar execTime $ now
return () return ()