diff options
author | Doug Horn <doughorn@google.com> | 2021-05-26 16:09:57 -0700 |
---|---|---|
committer | Doug Horn <doughorn@google.com> | 2021-05-26 16:11:19 -0700 |
commit | 61d0241ce58cf937bb930a3b64abbe606d41a1c0 (patch) | |
tree | 93588e0f04b9d47b12af2e23ee14b40f4741955f | |
parent | 057c173e2a137cbff76b215b429e48f937be5c7f (diff) | |
download | goldfish-opengl-61d0241ce58cf937bb930a3b64abbe606d41a1c0.tar.gz |
Fix return for eglChooseConfig.
Matching 0 configs does not an appear to be an error per
the spec. With no matching configs, return EGL_TRUE.
Bug: 188661157
Test: EGL_TRUE is returned even if no configs are matched.
Change-Id: Ib0d1f5f22c2391c31f4fae38742e631458d25b57
-rw-r--r-- | system/egl/egl.cpp | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/system/egl/egl.cpp b/system/egl/egl.cpp index c2048993..d72fa7fe 100644 --- a/system/egl/egl.cpp +++ b/system/egl/egl.cpp @@ -1253,7 +1253,7 @@ EGLBoolean eglChooseConfig(EGLDisplay dpy, const EGLint *attrib_list, EGLConfig attribs_size * sizeof(EGLint), (uint32_t*)tempConfigs, config_size); if (local_attrib_list) delete [] local_attrib_list; - if (*num_config <= 0) { + if (*num_config < 0) { EGLint err = -(*num_config); *num_config = 0; switch (err) { |