Skip to content

Commit

Permalink
Merge branch 'master' into x64
Browse files Browse the repository at this point in the history
  • Loading branch information
GermanAizek committed Aug 9, 2021
2 parents 9e536f1 + 47a4e88 commit 6013fca
Showing 1 changed file with 13 additions and 2 deletions.
15 changes: 13 additions & 2 deletions src/SFML/Window/iOS/EaglContext.mm
Original file line number Diff line number Diff line change
Expand Up @@ -164,8 +164,19 @@ void ensureInit()
{
static void* module = 0;

if (!module)
module = dlopen("libGLESv1_CM.dylib", RTLD_LAZY | RTLD_LOCAL);
const int libCount = 3;
const char* libs[libCount] =
{
"libGLESv1_CM.dylib",
"/System/Library/Frameworks/OpenGLES.framework/OpenGLES",
"OpenGLES.framework/OpenGLES"
};

for (int i = 0; i < libCount; ++i)
{
if (!module)
module = dlopen(libs[i], RTLD_LAZY | RTLD_LOCAL);
}

if (module)
return reinterpret_cast<GlFunctionPointer>(dlsym(module, name));
Expand Down

0 comments on commit 6013fca

Please sign in to comment.