mirror of
https://gitlab.freedesktop.org/mesa/mesa.git
synced 2026-02-04 15:00:36 +01:00
egl: Fix eglCheckConfigHandle.
A stupid bug by me made the check void. Signed-off-by: Chia-I Wu <olvaffe@gmail.com>
This commit is contained in:
parent
72fd1cf292
commit
2fc1614e7a
1 changed files with 4 additions and 5 deletions
|
|
@ -82,18 +82,17 @@ _eglAddConfig(_EGLDisplay *dpy, _EGLConfig *conf)
|
|||
EGLBoolean
|
||||
_eglCheckConfigHandle(EGLConfig config, _EGLDisplay *dpy)
|
||||
{
|
||||
_EGLConfig *conf = NULL;
|
||||
EGLint num_configs = (dpy) ? dpy->NumConfigs : 0;
|
||||
EGLint i;
|
||||
|
||||
for (i = 0; dpy && i < dpy->NumConfigs; i++) {
|
||||
conf = dpy->Configs[i];
|
||||
for (i = 0; i < num_configs; i++) {
|
||||
_EGLConfig *conf = dpy->Configs[i];
|
||||
if (conf == (_EGLConfig *) config) {
|
||||
assert(conf->Display == dpy);
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
return (conf != NULL);
|
||||
return (i < num_configs);
|
||||
}
|
||||
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue