From c0d86b9237ff55d1e3e05add0fdd987bf50e54be Mon Sep 17 00:00:00 2001 From: Gabriel Jacobo Date: Tue, 14 Jan 2014 21:29:38 -0300 Subject: [PATCH] Make EGL loading more resilient. Lesson learned while trying to run L4D2 under Wayland :) --- src/video/SDL_egl.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/video/SDL_egl.c b/src/video/SDL_egl.c index 3731a6c19..36fcac6eb 100644 --- a/src/video/SDL_egl.c +++ b/src/video/SDL_egl.c @@ -181,8 +181,8 @@ SDL_EGL_LoadLibrary(_THIS, const char *egl_path, NativeDisplayType native_displa if (egl_path != NULL) { dll_handle = SDL_LoadObject(egl_path); } - /* Catch the case where the application isn't linked with EGL */ - if ((SDL_LoadFunction(dll_handle, "eglChooseConfig") == NULL) && (egl_path == NULL)) { + /* Try loading a EGL symbol, if it does not work try the default library paths */ + if (SDL_LoadFunction(dll_handle, "eglChooseConfig") == NULL) { if (dll_handle != NULL) { SDL_UnloadObject(dll_handle); }