mirror of https://github.com/encounter/SDL.git
raspberrypi: The latest Raspbian moved its EGL and GLES2 libs elsewhere.
Now we try the new (hardware-specific) pathnames first, and if those fail to load, we'll try the more generic names that earlier versions of Raspbian used. Fixes Bugzilla #3800.
This commit is contained in:
parent
fa0eeff7f5
commit
0c892abcd0
|
@ -44,8 +44,10 @@
|
|||
|
||||
#if SDL_VIDEO_DRIVER_RPI
|
||||
/* Raspbian places the OpenGL ES/EGL binaries in a non standard path */
|
||||
#define DEFAULT_EGL "/opt/vc/lib/libEGL.so"
|
||||
#define DEFAULT_OGL_ES2 "/opt/vc/lib/libGLESv2.so"
|
||||
#define DEFAULT_EGL "/opt/vc/lib/libbrcmEGL.so"
|
||||
#define DEFAULT_OGL_ES2 "/opt/vc/lib/libbrcmGLESv2.so"
|
||||
#define ALT_EGL "/opt/vc/lib/libEGL.so"
|
||||
#define ALT_OGL_ES2 "/opt/vc/lib/libGLESv2.so"
|
||||
#define DEFAULT_OGL_ES_PVR "/opt/vc/lib/libGLES_CM.so"
|
||||
#define DEFAULT_OGL_ES "/opt/vc/lib/libGLESv1_CM.so"
|
||||
|
||||
|
@ -292,6 +294,13 @@ SDL_EGL_LoadLibrary(_THIS, const char *egl_path, NativeDisplayType native_displa
|
|||
if (_this->gl_config.major_version > 1) {
|
||||
path = DEFAULT_OGL_ES2;
|
||||
egl_dll_handle = SDL_LoadObject(path);
|
||||
#ifdef ALT_OGL_ES2
|
||||
if (egl_dll_handle == NULL) {
|
||||
path = ALT_OGL_ES2;
|
||||
egl_dll_handle = SDL_LoadObject(path);
|
||||
}
|
||||
#endif
|
||||
|
||||
} else {
|
||||
path = DEFAULT_OGL_ES;
|
||||
egl_dll_handle = SDL_LoadObject(path);
|
||||
|
@ -328,6 +337,14 @@ SDL_EGL_LoadLibrary(_THIS, const char *egl_path, NativeDisplayType native_displa
|
|||
path = DEFAULT_EGL;
|
||||
}
|
||||
dll_handle = SDL_LoadObject(path);
|
||||
|
||||
#ifdef ALT_EGL
|
||||
if (dll_handle == NULL) {
|
||||
path = ALT_EGL;
|
||||
dll_handle = SDL_LoadObject(path);
|
||||
}
|
||||
#endif
|
||||
|
||||
if (dll_handle == NULL || SDL_LoadFunction(dll_handle, "eglChooseConfig") == NULL) {
|
||||
if (dll_handle != NULL) {
|
||||
SDL_UnloadObject(dll_handle);
|
||||
|
|
Loading…
Reference in New Issue