From 255f9f02341e595657584c1bd38045e1518de642 Mon Sep 17 00:00:00 2001 From: Camilla Berglund Date: Thu, 27 Aug 2015 20:25:28 +0200 Subject: [PATCH] Fix deadlock with negative swap interval on Aero Fixes #587. --- src/wgl_context.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/wgl_context.c b/src/wgl_context.c index 0d44c9ce..20dff1a6 100644 --- a/src/wgl_context.c +++ b/src/wgl_context.c @@ -602,7 +602,7 @@ void _glfwPlatformSwapBuffers(_GLFWwindow* window) // HACK: Use DwmFlush when desktop composition is enabled if (_glfwIsCompositionEnabled() && !window->monitor) { - int count = window->wgl.interval; + int count = abs(window->wgl.interval); while (count--) _glfw_DwmFlush(); }