Added forcing of swap interval on DWM composition.

This commit is contained in:
Camilla Berglund
2013-07-07 23:29:13 +02:00
parent 0e12fb869c
commit 1c80e99008
4 changed files with 18 additions and 0 deletions
+2
View File
@@ -56,6 +56,8 @@
// Define this to 1 to disable dynamic loading of winmm
#cmakedefine _GLFW_NO_DLOAD_WINMM
// Define this to 1 if glfwSwapInterval should ignore DWM compositing status
#cmakedefine _GLFW_USE_DWM_SWAP_INTERVAL
// Define this to 1 if glXGetProcAddress is available
#cmakedefine _GLFW_HAS_GLXGETPROCADDRESS
+2
View File
@@ -600,12 +600,14 @@ void _glfwPlatformSwapInterval(int interval)
{
_GLFWwindow* window = _glfwPlatformGetCurrentContext();
#if !defined(_GLFW_USE_DWM_SWAP_INTERVAL)
if (_glfwIsCompositionEnabled())
{
// Don't enabled vsync when desktop compositing is enabled, as it leads
// to frame jitter
return;
}
#endif
if (window->wgl.EXT_swap_control)
window->wgl.SwapIntervalEXT(interval);