summaryrefslogtreecommitdiffstats
path: root/src/opengl
diff options
context:
space:
mode:
authorTarja Sundqvist <tarja.sundqvist@qt.io>2022-08-16 20:37:09 +0300
committerTarja Sundqvist <tarja.sundqvist@qt.io>2022-08-16 20:37:09 +0300
commitb7d91087099e4b69d70c0271fbeae19368d485d4 (patch)
treef46b62227cfeccf32b72f6aeb45c17cc7a933505 /src/opengl
parent231d3670981a33ec42b91ad1cb33c1fc50551066 (diff)
parentbbfbb18df18658e8ceec4bc04bd2cdf59f6a35ed (diff)
Merge remote-tracking branch 'origin/tqtc/lts-5.15.6' into tqtc/lts-5.15-opensource
Diffstat (limited to 'src/opengl')
-rw-r--r--src/opengl/qgl.cpp3
1 files changed, 2 insertions, 1 deletions
diff --git a/src/opengl/qgl.cpp b/src/opengl/qgl.cpp
index 4108b70094..0d4e9fc1b6 100644
--- a/src/opengl/qgl.cpp
+++ b/src/opengl/qgl.cpp
@@ -493,7 +493,8 @@ QSurfaceFormat QGLFormat::toSurfaceFormat(const QGLFormat &format)
retFormat.setSamples(format.samples() == -1 ? 4 : format.samples());
if (format.stencil())
retFormat.setStencilBufferSize(format.stencilBufferSize() == -1 ? 1 : format.stencilBufferSize());
- retFormat.setSwapInterval(format.swapInterval());
+ if (format.swapInterval() >= 0)
+ retFormat.setSwapInterval(format.swapInterval());
retFormat.setStereo(format.stereo());
retFormat.setMajorVersion(format.majorVersion());
retFormat.setMinorVersion(format.minorVersion());