summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--src/plugins/platforms/windows/qwindowsglcontext.cpp5
1 files changed, 2 insertions, 3 deletions
diff --git a/src/plugins/platforms/windows/qwindowsglcontext.cpp b/src/plugins/platforms/windows/qwindowsglcontext.cpp
index 6f59b33e62..da3e2a6a6a 100644
--- a/src/plugins/platforms/windows/qwindowsglcontext.cpp
+++ b/src/plugins/platforms/windows/qwindowsglcontext.cpp
@@ -279,7 +279,7 @@ static PIXELFORMATDESCRIPTOR
if (format.stereo())
pfd.dwFlags |= PFD_STEREO;
- if (format.swapBehavior() == QSurfaceFormat::DoubleBuffer && !isPixmap)
+ if (format.swapBehavior() != QSurfaceFormat::SingleBuffer && !isPixmap)
pfd.dwFlags |= PFD_DOUBLEBUFFER;
pfd.cDepthBits =
format.depthBufferSize() >= 0 ? format.depthBufferSize() : 32;
@@ -389,12 +389,11 @@ static int choosePixelFormat(HDC hdc,
iAttributes[i++] = WGL_COLOR_BITS_ARB;
iAttributes[i++] = 24;
switch (format.swapBehavior()) {
- case QSurfaceFormat::DefaultSwapBehavior:
- break;
case QSurfaceFormat::SingleBuffer:
iAttributes[i++] = WGL_DOUBLE_BUFFER_ARB;
iAttributes[i++] = FALSE;
break;
+ case QSurfaceFormat::DefaultSwapBehavior:
case QSurfaceFormat::DoubleBuffer:
case QSurfaceFormat::TripleBuffer:
iAttributes[i++] = WGL_DOUBLE_BUFFER_ARB;