1
0
Fork 0
mirror of https://github.com/gwm17/glfw.git synced 2024-11-23 02:38:52 -05:00

Fixed regression for WGL full screen DWM hack.

The DwmFlush workaround for windowed windows on Nvidia caused jitter for
full screen windows.  The workaround is now only used for windowed mode
windows.

Fixes #519.
This commit is contained in:
Camilla Berglund 2015-06-15 20:19:44 +02:00
parent b15eaeda16
commit 3a0b397054

View File

@ -571,7 +571,7 @@ void _glfwPlatformMakeContextCurrent(_GLFWwindow* window)
void _glfwPlatformSwapBuffers(_GLFWwindow* window) void _glfwPlatformSwapBuffers(_GLFWwindow* window)
{ {
// HACK: Use DwmFlush when desktop composition is enabled // HACK: Use DwmFlush when desktop composition is enabled
if (_glfwIsCompositionEnabled()) if (_glfwIsCompositionEnabled() && !window->monitor)
{ {
int count = window->wgl.interval; int count = window->wgl.interval;
while (count--) while (count--)
@ -589,7 +589,7 @@ void _glfwPlatformSwapInterval(int interval)
// HACK: Disable WGL swap interval when desktop composition is enabled to // HACK: Disable WGL swap interval when desktop composition is enabled to
// avoid interfering with DWM vsync // avoid interfering with DWM vsync
if (_glfwIsCompositionEnabled()) if (_glfwIsCompositionEnabled() && !window->monitor)
interval = 0; interval = 0;
if (window->wgl.EXT_swap_control) if (window->wgl.EXT_swap_control)