No swap interval on composition.

This commit is contained in:
Camilla Berglund
2013-03-11 20:54:32 +01:00
parent 54d1d14f59
commit 51ee3a5c0a
4 changed files with 60 additions and 1 deletions
+14
View File
@@ -606,6 +606,20 @@ static LRESULT CALLBACK windowProc(HWND hWnd, UINT uMsg,
}
break;
}
case WM_DWMCOMPOSITIONCHANGED:
{
if (_glfwIsCompositionEnabled())
{
_GLFWwindow* previous = _glfwPlatformGetCurrentContext();
_glfwPlatformMakeContextCurrent(window);
_glfwPlatformSwapInterval(0);
_glfwPlatformMakeContextCurrent(previous);
}
// TODO: Restore vsync if compositing was disabled
break;
}
}
return DefWindowProc(hWnd, uMsg, wParam, lParam);