From bea2f16b9beee574a5e19d73d63cbbbaa7078b0e Mon Sep 17 00:00:00 2001 From: David Robillard Date: Tue, 23 Jul 2019 00:34:05 +0200 Subject: Windows: Only set double buffered pixel format when requested --- pugl/pugl_win.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) 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; -- cgit v1.2.1