diff options
author | David Robillard <d@drobilla.net> | 2020-03-08 18:31:47 +0100 |
---|---|---|
committer | David Robillard <d@drobilla.net> | 2020-03-08 18:31:47 +0100 |
commit | 2c82dfe87ece6322235933537d2ed59812c312c3 (patch) | |
tree | 9f4fddf8537c23967adb4908f40ec3286154a2c8 | |
parent | 3ed884a7d23bf349716993650f5ed9b18dc5acae (diff) |
Windows: Implement PUGL_DONT_CARE for PUGL_SWAP_INTERVAL
-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; |