From 0c0bb28d39b2f4a0b48ab447a37564e23d651d55 Mon Sep 17 00:00:00 2001 From: Camilla Berglund Date: Wed, 4 Dec 2013 08:00:53 +0100 Subject: [PATCH] Allow setting swap interval to zero on DWM. --- README.md | 1 + src/wgl_context.c | 2 +- 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/README.md b/README.md index 16f7b0f0..7cd6f31e 100644 --- a/README.md +++ b/README.md @@ -39,6 +39,7 @@ guide in the GLFW documentation. - Renamed configuration header to `glfw_config.h` to avoid conflicts - Bugfix: The `glfw3.pc` file did not respect the `LIB_SUFFIX` CMake option - Bugfix: The `joysticks` test would segfault if a controller had no axes + - [Win32] Allowed swap interval to be explicitly set to zero on DWM systems - [Win32] Bugfix: Removed joystick axis value negation left over from GLFW 2 - [Win32] Bugfix: Restoring windows using the Win+D hot key did not trigger the focus callback diff --git a/src/wgl_context.c b/src/wgl_context.c index 6e7d5030..0b3610bd 100644 --- a/src/wgl_context.c +++ b/src/wgl_context.c @@ -606,7 +606,7 @@ void _glfwPlatformSwapInterval(int interval) _GLFWwindow* window = _glfwPlatformGetCurrentContext(); #if !defined(_GLFW_USE_DWM_SWAP_INTERVAL) - if (_glfwIsCompositionEnabled()) + if (_glfwIsCompositionEnabled() && interval) { // Don't enabled vsync when desktop compositing is enabled, as it leads // to frame jitter