diff options
Diffstat (limited to 'pugl')
-rw-r--r-- | pugl/detail/win_gl.c | 5 |
1 files changed, 3 insertions, 2 deletions
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; |