src/video/SDL_egl.c
changeset 8041 afd62b3fda31
parent 8021 f96e12e0ade9
child 8045 3c2694255705
equal deleted inserted replaced
8039:3b0346b37e0f 8041:afd62b3fda31
   223         SDL_strlcpy(_this->gl_config.driver_path, path, sizeof(_this->gl_config.driver_path) - 1);
   223         SDL_strlcpy(_this->gl_config.driver_path, path, sizeof(_this->gl_config.driver_path) - 1);
   224     } else {
   224     } else {
   225         *_this->gl_config.driver_path = '\0';
   225         *_this->gl_config.driver_path = '\0';
   226     }
   226     }
   227     
   227     
   228     /* We need to select a config here to satisfy some video backends such as X11 */
   228     return 0;
   229     return SDL_EGL_ChooseConfig(_this);
       
   230 }
   229 }
   231 
   230 
   232 int
   231 int
   233 SDL_EGL_ChooseConfig(_THIS) 
   232 SDL_EGL_ChooseConfig(_THIS) 
   234 {
   233 {
   450 }
   449 }
   451 
   450 
   452 EGLSurface *
   451 EGLSurface *
   453 SDL_EGL_CreateSurface(_THIS, NativeWindowType nw) 
   452 SDL_EGL_CreateSurface(_THIS, NativeWindowType nw) 
   454 {
   453 {
       
   454     if (SDL_EGL_ChooseConfig(_this) != 0) {
       
   455         return -1;
       
   456     }
       
   457     
   455     return _this->egl_data->eglCreateWindowSurface(
   458     return _this->egl_data->eglCreateWindowSurface(
   456             _this->egl_data->egl_display,
   459             _this->egl_data->egl_display,
   457             _this->egl_data->egl_config,
   460             _this->egl_data->egl_config,
   458             nw, NULL);
   461             nw, NULL);
   459 }
   462 }