Skip to content

Commit

Permalink
GTK / GTK2 Ports: EGL contexts running legacy OpenGL no longer requir…
Browse files Browse the repository at this point in the history
…e the EGL_KHR_surfaceless_context extension.
  • Loading branch information
rogerman committed Aug 3, 2024
1 parent 79f3f94 commit d7dcc85
Showing 1 changed file with 9 additions and 5 deletions.
14 changes: 9 additions & 5 deletions desmume/src/frontend/posix/shared/egl_3Demu.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -75,12 +75,16 @@ static bool __egl_initOpenGL(const int requestedAPI, const int requestedProfile,
return false;
}

foundString = strstr(extensionSet, "EGL_KHR_surfaceless_context");
if (foundString == NULL)
if ( ((requestedAPI == EGL_OPENGL_API) && (requestedProfile == EGL_CONTEXT_OPENGL_CORE_PROFILE_BIT_KHR)) ||
(requestedAPI == EGL_OPENGL_ES_API) )
{
eglTerminate(currDisplay);
puts("EGL: EGL_KHR_surfaceless_context is a required extension.");
return false;
foundString = strstr(extensionSet, "EGL_KHR_surfaceless_context");
if (foundString == NULL)
{
eglTerminate(currDisplay);
puts("EGL: EGL_KHR_surfaceless_context is a required extension for 3.2 Core Profile and OpenGL ES.");
return false;
}
}
}

Expand Down

0 comments on commit d7dcc85

Please sign in to comment.