From 2c82dfe87ece6322235933537d2ed59812c312c3 Mon Sep 17 00:00:00 2001 From: David Robillard Date: Sun, 8 Mar 2020 18:31:47 +0100 Subject: Windows: Implement PUGL_DONT_CARE for PUGL_SWAP_INTERVAL --- pugl/detail/win_gl.c | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) (limited to 'pugl') diff --git a/pugl/detail/win_gl.c b/pugl/detail/win_gl.c index cb08831..edbe1dd 100644 --- a/pugl/detail/win_gl.c +++ b/pugl/detail/win_gl.c @@ -230,8 +230,9 @@ puglWinGlCreate(PuglView* view) // Enter context and set swap interval wglMakeCurrent(impl->hdc, surface->hglrc); - if (surface->procs.wglSwapInterval) { - surface->procs.wglSwapInterval(view->hints[PUGL_SWAP_INTERVAL]); + const int swapInterval = view->hints[PUGL_SWAP_INTERVAL]; + if (surface->procs.wglSwapInterval && swapInterval != PUGL_DONT_CARE) { + surface->procs.wglSwapInterval(swapInterval); } return PUGL_SUCCESS; -- cgit v1.2.1