This changes _eglInitConfig to take the display as its argument.
EGLBoolean ok;
memset(&template, 0, sizeof(template));
- _eglInitConfig(&template.Base, id);
+ _eglInitConfig(&template.Base, dpy, id);
if (GLX_dpy->have_fbconfig)
ok = convert_fbconfig(GLX_dpy->dpy, GLX_dpy->fbconfigs[i], &template);
else
{
EGLint val;
- _eglInitConfig(conf, id);
if (!_eglConfigFromContextModesRec(conf, m, EGL_OPENGL_BIT, EGL_OPENGL_BIT))
return EGL_FALSE;
_EGLConfig conf;
EGLint rb;
+ _eglInitConfig(&conf, disp, id);
if (!convert_config(&conf, id, m))
continue;
if (m->doubleBufferMode) {
* IDs are from 1 to N respectively.
*/
void
-_eglInitConfig(_EGLConfig *config, EGLint id)
+_eglInitConfig(_EGLConfig *config, _EGLDisplay *dpy, EGLint id)
{
memset(config, 0, sizeof(*config));
+ config->Display = dpy;
+
/* some attributes take non-zero default values */
SET_CONFIG_ATTRIB(config, EGL_CONFIG_ID, id);
SET_CONFIG_ATTRIB(config, EGL_CONFIG_CAVEAT, EGL_NONE);
if (!num_configs)
return _eglError(EGL_BAD_PARAMETER, "eglChooseConfigs");
- _eglInitConfig(&criteria, 0);
+ _eglInitConfig(&criteria, disp, 0);
if (!_eglParseConfigAttribList(&criteria, attrib_list))
return _eglError(EGL_BAD_ATTRIBUTE, "eglChooseConfig");
PUBLIC void
-_eglInitConfig(_EGLConfig *config, EGLint id);
+_eglInitConfig(_EGLConfig *config, _EGLDisplay *dpy, EGLint id);
PUBLIC EGLConfig
if (!gconf)
continue;
- _eglInitConfig(&gconf->base, id);
+ _eglInitConfig(&gconf->base, dpy, id);
api_mask = get_mode_api_mask(&native_configs[i]->mode, gdrv->api_mask);
if (!api_mask) {