- if (cfg) {
- screen = cfg->screen;
- } else {
- for (unsigned int i = 0; i < num_attribs; i++) {
- if (attrib_list[i * 2] == GLX_SCREEN)
- screen = attrib_list[i * 2 + 1];
- }
- if (screen == -1) {
- __glXSendError(dpy, BadValue, 0, X_GLXCreateContextAttribsARB, True);
- return NULL;
- }
- }