src/video/SDL_egl.c
changeset 8041 afd62b3fda31
parent 8021 f96e12e0ade9
child 8045 3c2694255705
     1.1 --- a/src/video/SDL_egl.c	Fri Nov 29 10:06:08 2013 -0300
     1.2 +++ b/src/video/SDL_egl.c	Mon Dec 02 10:08:57 2013 -0300
     1.3 @@ -225,8 +225,7 @@
     1.4          *_this->gl_config.driver_path = '\0';
     1.5      }
     1.6      
     1.7 -    /* We need to select a config here to satisfy some video backends such as X11 */
     1.8 -    return SDL_EGL_ChooseConfig(_this);
     1.9 +    return 0;
    1.10  }
    1.11  
    1.12  int
    1.13 @@ -452,6 +451,10 @@
    1.14  EGLSurface *
    1.15  SDL_EGL_CreateSurface(_THIS, NativeWindowType nw) 
    1.16  {
    1.17 +    if (SDL_EGL_ChooseConfig(_this) != 0) {
    1.18 +        return -1;
    1.19 +    }
    1.20 +    
    1.21      return _this->egl_data->eglCreateWindowSurface(
    1.22              _this->egl_data->egl_display,
    1.23              _this->egl_data->egl_config,