mirror of
https://github.com/libsdl-org/SDL.git
synced 2025-10-19 16:21:44 +00:00
hints: replace SDL_HINT_VIDEO_X11_FORCE_EGL with platform-agnostic SDL_HINT_VIDEO_FORCE_EGL
This adds support for forcing the use of EGL on Windows and MacOS. The SDL_HINT_VIDEO_X11_FORCE_EGL hint is retained for backwards compatibility but is now deprecated.
This commit is contained in:
@@ -253,6 +253,7 @@ X11_GL_LoadLibrary(_THIS, const char *path)
|
||||
* GLX_EXT_create_context_es2_profile extension, switch over to X11_GLES functions
|
||||
*/
|
||||
if (((_this->gl_config.profile_mask == SDL_GL_CONTEXT_PROFILE_ES) ||
|
||||
SDL_GetHintBoolean(SDL_HINT_VIDEO_FORCE_EGL, SDL_FALSE) ||
|
||||
SDL_GetHintBoolean(SDL_HINT_VIDEO_X11_FORCE_EGL, SDL_FALSE)) &&
|
||||
X11_GL_UseEGL(_this) ) {
|
||||
#if SDL_VIDEO_OPENGL_EGL
|
||||
@@ -691,7 +692,8 @@ SDL_bool
|
||||
X11_GL_UseEGL(_THIS)
|
||||
{
|
||||
SDL_assert(_this->gl_data != NULL);
|
||||
if (SDL_GetHintBoolean(SDL_HINT_VIDEO_X11_FORCE_EGL, SDL_FALSE))
|
||||
if (SDL_GetHintBoolean(SDL_HINT_VIDEO_FORCE_EGL, SDL_FALSE) ||
|
||||
SDL_GetHintBoolean(SDL_HINT_VIDEO_X11_FORCE_EGL, SDL_FALSE))
|
||||
{
|
||||
/* use of EGL has been requested, even for desktop GL */
|
||||
return SDL_TRUE;
|
||||
|
Reference in New Issue
Block a user