diff options
author | Harald Fernengel <harald@trolltech.com> | 2009-08-10 15:02:32 (GMT) |
---|---|---|
committer | Harald Fernengel <harald@trolltech.com> | 2009-08-10 15:06:03 (GMT) |
commit | d918f98a4ab80405e0fe75fadf8491069a4c7ab8 (patch) | |
tree | 2e1cb01a21a1c6e010c1d3388b8ce8b6075189af | |
parent | cbd8a54f8c55e1982430fc929e9d74f977699428 (diff) | |
download | Qt-d918f98a4ab80405e0fe75fadf8491069a4c7ab8.zip Qt-d918f98a4ab80405e0fe75fadf8491069a4c7ab8.tar.gz Qt-d918f98a4ab80405e0fe75fadf8491069a4c7ab8.tar.bz2 |
Make chooseConfig work on some EGL implementations
According to the spec, if we pass a 0 out pointer,
EGL should tell us how many configurations are available.
However, we pass a 0 out pointer, but say that it's 256 elements big,
it confuses some implementations. Fix that by passing a 0 out pointer
and saying that it has space for 0 elements. Now we correctly get the
amount of available configs.
Reviewed-by: Rhys Weatherley <rhys.weatherley@nokia.com>
-rw-r--r-- | src/gui/egl/qegl.cpp | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/src/gui/egl/qegl.cpp b/src/gui/egl/qegl.cpp index ebdac9a..1c45a58 100644 --- a/src/gui/egl/qegl.cpp +++ b/src/gui/egl/qegl.cpp @@ -95,7 +95,7 @@ bool QEglContext::chooseConfig do { // Get the number of matching configurations for this set of properties. EGLint matching = 0; - if (!eglChooseConfig(dpy, props.properties(), 0, 256, &matching) || !matching) + if (!eglChooseConfig(dpy, props.properties(), 0, 0, &matching) || !matching) continue; // If we want the best pixel format, then return the first |