gloss 1.7.6.3 → 1.7.6.4
raw patch · 2 files changed
+19/−15 lines, 2 files
Files
Graphics/Gloss/Internals/Interface/Backend/GLFW.hs view
@@ -437,23 +437,27 @@ -> IO () runMainLoopGLFW stateRef - = X.catch go (exitGLFW stateRef)+ = X.catch go exit+ where+ exit :: X.SomeException -> IO ()+ exit _ = exitGLFW stateRef - go :: IO ()- go = do windowIsOpen <- GLFW.windowIsOpen- when windowIsOpen - $ do GLFW.pollEvents- dirty <- fmap dirtyScreen $ readIORef stateRef+ go :: IO ()+ go + = do windowIsOpen <- GLFW.windowIsOpen+ when windowIsOpen + $ do GLFW.pollEvents+ dirty <- fmap dirtyScreen $ readIORef stateRef - when dirty- $ do s <- readIORef stateRef- display s- GLFW.swapBuffers+ when dirty+ $ do s <- readIORef stateRef+ display s+ GLFW.swapBuffers - modifyIORef stateRef $ \s -> s { dirtyScreen = False }- (readIORef stateRef) >>= (\s -> idle s)- GLFW.sleep 0.001- runMainLoopGLFW stateRef+ modifyIORef stateRef $ \s -> s { dirtyScreen = False }+ (readIORef stateRef) >>= (\s -> idle s)+ GLFW.sleep 0.001+ runMainLoopGLFW stateRef -- Redisplay ------------------------------------------------------------------
gloss.cabal view
@@ -1,5 +1,5 @@ Name: gloss-Version: 1.7.6.3+Version: 1.7.6.4 License: MIT License-file: LICENSE Author: Ben Lippmeier