src/video/x11/SDL_x11opengles.c
changeset 7471 75726efbf679
parent 7191 75360622e65f
child 7659 ac4ce59c40e7
equal deleted inserted replaced
7470:e2c81eca0326 7471:75726efbf679
   210 X11_GLES_GetVisual(_THIS, Display * display, int screen)
   210 X11_GLES_GetVisual(_THIS, Display * display, int screen)
   211 {
   211 {
   212     /* 64 seems nice. */
   212     /* 64 seems nice. */
   213     EGLint attribs[64];
   213     EGLint attribs[64];
   214     EGLint found_configs = 0;
   214     EGLint found_configs = 0;
   215     VisualID visual_id;
   215     EGLint visual_id;
   216     int i;
   216     int i;
   217 
   217 
   218     if (!_this->gles_data) {
   218     if (!_this->gles_data) {
   219         /* The EGL library wasn't loaded, SDL_GetError() should have info */
   219         /* The EGL library wasn't loaded, SDL_GetError() should have info */
   220         return NULL;
   220         return NULL;
   275     }
   275     }
   276 
   276 
   277     if (_this->gles_data->eglGetConfigAttrib(_this->gles_data->egl_display,
   277     if (_this->gles_data->eglGetConfigAttrib(_this->gles_data->egl_display,
   278                                              _this->gles_data->egl_config,
   278                                              _this->gles_data->egl_config,
   279                                              EGL_NATIVE_VISUAL_ID,
   279                                              EGL_NATIVE_VISUAL_ID,
   280                                              (EGLint *) & visual_id) ==
   280                                              &visual_id) ==
   281         EGL_FALSE || !visual_id) {
   281         EGL_FALSE || !visual_id) {
   282         /* Use the default visual when all else fails */
   282         /* Use the default visual when all else fails */
   283         XVisualInfo vi_in;
   283         XVisualInfo vi_in;
   284         int out_count;
   284         int out_count;
   285         vi_in.screen = screen;
   285         vi_in.screen = screen;