summaryrefslogtreecommitdiffstats
path: root/src/opengl/qgl_egl.cpp
diff options
context:
space:
mode:
authorTom Cooksey <thomas.cooksey@nokia.com>2009-05-22 17:28:41 (GMT)
committerTom Cooksey <thomas.cooksey@nokia.com>2009-05-22 17:40:51 (GMT)
commit73a9e0fac1e1b417878286791877bcefeedb16a1 (patch)
tree401736b05bf2bd506042bacb87e8232888a15775 /src/opengl/qgl_egl.cpp
parentbfde87dcc8d0f363ecf1da59482c15445b00484c (diff)
downloadQt-73a9e0fac1e1b417878286791877bcefeedb16a1.zip
Qt-73a9e0fac1e1b417878286791877bcefeedb16a1.tar.gz
Qt-73a9e0fac1e1b417878286791877bcefeedb16a1.tar.bz2
Fix changed behaviour after QEglProperties::value() patch
Patch 27fadaa7eb2d58b47e7f0f508e3402e7a8de3894 (Make QEglProperties::value() return the EGL default if not set) changed behaviour. This patch reverts this change to behaviour but keeps QEglProperties::value() returning the EGL default value.
Diffstat (limited to 'src/opengl/qgl_egl.cpp')
-rw-r--r--src/opengl/qgl_egl.cpp8
1 files changed, 4 insertions, 4 deletions
diff --git a/src/opengl/qgl_egl.cpp b/src/opengl/qgl_egl.cpp
index 98c5710..287c537 100644
--- a/src/opengl/qgl_egl.cpp
+++ b/src/opengl/qgl_egl.cpp
@@ -57,14 +57,14 @@ void qt_egl_set_format(QEglProperties& props, int deviceType, const QGLFormat& f
// Set the pixel format to that contained in the QGLFormat
// if the system hasn't already chosen a fixed format to
// match the pixmap, widget, etc.
- if (props.value(EGL_RED_SIZE) == EGL_DONT_CARE || f.redBufferSize() != -1)
+ if (props.value(EGL_RED_SIZE) == 0 || f.redBufferSize() != -1)
props.setValue(EGL_RED_SIZE, f.redBufferSize() == -1 ? 1 : f.redBufferSize());
- if (props.value(EGL_GREEN_SIZE) == EGL_DONT_CARE || f.greenBufferSize() != -1)
+ if (props.value(EGL_GREEN_SIZE) == 0 || f.greenBufferSize() != -1)
props.setValue(EGL_GREEN_SIZE, f.greenBufferSize() == -1 ? 1 : f.greenBufferSize());
- if (props.value(EGL_BLUE_SIZE) == EGL_DONT_CARE || f.blueBufferSize() != -1)
+ if (props.value(EGL_BLUE_SIZE) == 0 || f.blueBufferSize() != -1)
props.setValue(EGL_BLUE_SIZE, f.blueBufferSize() == -1 ? 1 : f.blueBufferSize());
if (f.alpha()) {
- if (props.value(EGL_ALPHA_SIZE) == EGL_DONT_CARE || f.alphaBufferSize() != -1)
+ if (props.value(EGL_ALPHA_SIZE) == 0 || f.alphaBufferSize() != -1)
props.setValue(EGL_ALPHA_SIZE, f.alphaBufferSize() == -1 ? 1 : f.alphaBufferSize());
}