src/video/SDL_egl.c
changeset 11462 dc5698982bac
parent 11418 7749a3b2b343
child 11516 68a767ae3a88
     1.1 --- a/src/video/SDL_egl.c	Wed Sep 06 07:29:34 2017 -0700
     1.2 +++ b/src/video/SDL_egl.c	Wed Sep 06 19:34:23 2017 -0400
     1.3 @@ -44,8 +44,10 @@
     1.4  
     1.5  #if SDL_VIDEO_DRIVER_RPI
     1.6  /* Raspbian places the OpenGL ES/EGL binaries in a non standard path */
     1.7 -#define DEFAULT_EGL "/opt/vc/lib/libEGL.so"
     1.8 -#define DEFAULT_OGL_ES2 "/opt/vc/lib/libGLESv2.so"
     1.9 +#define DEFAULT_EGL "/opt/vc/lib/libbrcmEGL.so"
    1.10 +#define DEFAULT_OGL_ES2 "/opt/vc/lib/libbrcmGLESv2.so"
    1.11 +#define ALT_EGL "/opt/vc/lib/libEGL.so"
    1.12 +#define ALT_OGL_ES2 "/opt/vc/lib/libGLESv2.so"
    1.13  #define DEFAULT_OGL_ES_PVR "/opt/vc/lib/libGLES_CM.so"
    1.14  #define DEFAULT_OGL_ES "/opt/vc/lib/libGLESv1_CM.so"
    1.15  
    1.16 @@ -292,6 +294,13 @@
    1.17              if (_this->gl_config.major_version > 1) {
    1.18                  path = DEFAULT_OGL_ES2;
    1.19                  egl_dll_handle = SDL_LoadObject(path);
    1.20 +#ifdef ALT_OGL_ES2
    1.21 +                if (egl_dll_handle == NULL) {
    1.22 +                    path = ALT_OGL_ES2;
    1.23 +                    egl_dll_handle = SDL_LoadObject(path);
    1.24 +                }
    1.25 +#endif
    1.26 +
    1.27              } else {
    1.28                  path = DEFAULT_OGL_ES;
    1.29                  egl_dll_handle = SDL_LoadObject(path);
    1.30 @@ -328,6 +337,14 @@
    1.31              path = DEFAULT_EGL;
    1.32          }
    1.33          dll_handle = SDL_LoadObject(path);
    1.34 +
    1.35 +#ifdef ALT_EGL
    1.36 +        if (dll_handle == NULL) {
    1.37 +            path = ALT_EGL;
    1.38 +            dll_handle = SDL_LoadObject(path);
    1.39 +        }
    1.40 +#endif
    1.41 +
    1.42          if (dll_handle == NULL || SDL_LoadFunction(dll_handle, "eglChooseConfig") == NULL) {
    1.43              if (dll_handle != NULL) {
    1.44                  SDL_UnloadObject(dll_handle);