diff options
author | David Robillard <d@drobilla.net> | 2019-07-23 00:34:05 +0200 |
---|---|---|
committer | David Robillard <d@drobilla.net> | 2019-07-23 20:28:56 +0200 |
commit | bea2f16b9beee574a5e19d73d63cbbbaa7078b0e (patch) | |
tree | 611d20929ef02f65f628b8daf8be41b336643927 | |
parent | 07834ba689cb7e25bdf36fbcfa6cd691107cf3c0 (diff) |
Windows: Only set double buffered pixel format when requested
-rw-r--r-- | pugl/pugl_win.c | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/pugl/pugl_win.c b/pugl/pugl_win.c index 998e242..acf1700 100644 --- a/pugl/pugl_win.c +++ b/pugl/pugl_win.c @@ -148,7 +148,8 @@ puglGetPixelFormatDescriptor(const PuglHints* hints) ZeroMemory(&pfd, sizeof(pfd)); pfd.nSize = sizeof(pfd); pfd.nVersion = 1; - pfd.dwFlags = PFD_DRAW_TO_WINDOW|PFD_SUPPORT_OPENGL|PFD_DOUBLEBUFFER; + pfd.dwFlags = PFD_DRAW_TO_WINDOW|PFD_SUPPORT_OPENGL; + pfd.dwFlags |= hints->double_buffer ? PFD_DOUBLEBUFFER : 0; pfd.iPixelType = PFD_TYPE_RGBA; pfd.cColorBits = (BYTE)rgbBits; pfd.cRedBits = (BYTE)hints->red_bits; |