OpenGLContext: Try libEGL.so.1 as well as libEGL.so

This commit is contained in:
Stenzek 2024-03-10 19:35:42 +10:00
parent d1a1cab9a9
commit 51b3fabd31
No known key found for this signature in database

View file

@ -26,13 +26,19 @@ static bool LoadEGL()
{ {
DebugAssert(!s_egl_library.IsOpen()); DebugAssert(!s_egl_library.IsOpen());
const std::string egl_libname = DynamicLibrary::GetVersionedFilename("libEGL"); std::string egl_libname = DynamicLibrary::GetVersionedFilename("libEGL");
Log_InfoFmt("Loading EGL from {}...", egl_libname); Log_InfoFmt("Loading EGL from {}...", egl_libname);
Error error; Error error;
if (!s_egl_library.Open(egl_libname.c_str(), &error))
{
// Try versioned.
egl_libname = DynamicLibrary::GetVersionedFilename("libEGL", 1);
Log_InfoFmt("Loading EGL from {}...", egl_libname);
if (!s_egl_library.Open(egl_libname.c_str(), &error)) if (!s_egl_library.Open(egl_libname.c_str(), &error))
Log_ErrorFmt("Failed to load EGL: {}", error.GetDescription()); Log_ErrorFmt("Failed to load EGL: {}", error.GetDescription());
} }
}
return s_egl_library.IsOpen(); return s_egl_library.IsOpen();
} }