windows: support forcing EGL for GL desktop

This will theoretically support ANGLE's GL desktop frontend whenever it
becomes fully implemented and enabled in the future.
This commit is contained in:
Steven Noonan
2022-09-11 12:30:18 -07:00
parent 085a276d6c
commit e8fbb02d16
3 changed files with 9 additions and 4 deletions

View File

@@ -542,9 +542,10 @@ WIN_CreateWindow(_THIS, SDL_Window * window)
/* The rest of this macro mess is for OpenGL or OpenGL ES windows */
#if SDL_VIDEO_OPENGL_ES2
if (_this->gl_config.profile_mask == SDL_GL_CONTEXT_PROFILE_ES
if ((_this->gl_config.profile_mask == SDL_GL_CONTEXT_PROFILE_ES ||
SDL_GetHintBoolean(SDL_HINT_VIDEO_FORCE_EGL, SDL_FALSE)) &&
#if SDL_VIDEO_OPENGL_WGL
&& (!_this->gl_data || WIN_GL_UseEGL(_this))
(!_this->gl_data || WIN_GL_UseEGL(_this))
#endif /* SDL_VIDEO_OPENGL_WGL */
) {
#if SDL_VIDEO_OPENGL_EGL