aboutsummaryrefslogtreecommitdiffstats
path: root/pugl/detail
diff options
context:
space:
mode:
authorDavid Robillard <d@drobilla.net>2020-03-08 18:31:47 +0100
committerDavid Robillard <d@drobilla.net>2020-03-08 18:31:47 +0100
commit2c82dfe87ece6322235933537d2ed59812c312c3 (patch)
tree9f4fddf8537c23967adb4908f40ec3286154a2c8 /pugl/detail
parent3ed884a7d23bf349716993650f5ed9b18dc5acae (diff)
downloadpugl-2c82dfe87ece6322235933537d2ed59812c312c3.tar.gz
pugl-2c82dfe87ece6322235933537d2ed59812c312c3.tar.bz2
pugl-2c82dfe87ece6322235933537d2ed59812c312c3.zip
Windows: Implement PUGL_DONT_CARE for PUGL_SWAP_INTERVAL
Diffstat (limited to 'pugl/detail')
-rw-r--r--pugl/detail/win_gl.c5
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;