x11: Remove deprecated/defunct X11 hints

SDL_HINT_VIDEO_X11_FORCE_EGL was deprecated in favor of the more general SDL_HINT_VIDEO_FORCE_EGL, and Xinerama and Xvidmode support was previously removed from SDL, rendering their associated hints nonfunctional.
This commit is contained in:
Frank Praznik
2022-11-25 16:37:57 -05:00
committed by Sam Lantinga
parent 346eeba210
commit 873ec097ea
6 changed files with 13 additions and 44 deletions

View File

@@ -251,8 +251,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)) &&
SDL_GetHintBoolean(SDL_HINT_VIDEO_FORCE_EGL, SDL_FALSE)) &&
X11_GL_UseEGL(_this) ) {
#if SDL_VIDEO_OPENGL_EGL
X11_GL_UnloadLibrary(_this);
@@ -690,9 +689,7 @@ SDL_bool
X11_GL_UseEGL(_THIS)
{
SDL_assert(_this->gl_data != NULL);
if (SDL_GetHintBoolean(SDL_HINT_VIDEO_FORCE_EGL, SDL_FALSE) ||
SDL_GetHintBoolean(SDL_HINT_VIDEO_X11_FORCE_EGL, SDL_FALSE))
{
if (SDL_GetHintBoolean(SDL_HINT_VIDEO_FORCE_EGL, SDL_FALSE)) {
/* use of EGL has been requested, even for desktop GL */
return SDL_TRUE;
}

View File

@@ -36,8 +36,7 @@ X11_GLES_LoadLibrary(_THIS, const char *path)
/* If the profile requested is not GL ES, switch over to X11_GL 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)) {
!SDL_GetHintBoolean(SDL_HINT_VIDEO_FORCE_EGL, SDL_FALSE)) {
#if SDL_VIDEO_OPENGL_GLX
X11_GLES_UnloadLibrary(_this);
_this->GL_LoadLibrary = X11_GL_LoadLibrary;

View File

@@ -287,8 +287,7 @@ X11_CreateDevice(void)
#endif
#if SDL_VIDEO_OPENGL_EGL
#if SDL_VIDEO_OPENGL_GLX
if (SDL_GetHintBoolean(SDL_HINT_VIDEO_FORCE_EGL, SDL_FALSE) ||
SDL_GetHintBoolean(SDL_HINT_VIDEO_X11_FORCE_EGL, SDL_FALSE)) {
if (SDL_GetHintBoolean(SDL_HINT_VIDEO_FORCE_EGL, SDL_FALSE)) {
#endif
device->GL_LoadLibrary = X11_GLES_LoadLibrary;
device->GL_GetProcAddress = X11_GLES_GetProcAddress;

View File

@@ -431,8 +431,7 @@ X11_CreateWindow(_THIS, SDL_Window * window)
#if SDL_VIDEO_OPENGL_EGL
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))
SDL_GetHintBoolean(SDL_HINT_VIDEO_FORCE_EGL, SDL_FALSE))
#if SDL_VIDEO_OPENGL_GLX
&& ( !_this->gl_data || X11_GL_UseEGL(_this) )
#endif
@@ -654,7 +653,7 @@ X11_CreateWindow(_THIS, SDL_Window * window)
#if SDL_VIDEO_OPENGL_ES || SDL_VIDEO_OPENGL_ES2 || SDL_VIDEO_OPENGL_EGL
if ((window->flags & SDL_WINDOW_OPENGL) &&
((_this->gl_config.profile_mask == SDL_GL_CONTEXT_PROFILE_ES) ||
SDL_GetHintBoolean(SDL_HINT_VIDEO_X11_FORCE_EGL, SDL_FALSE))
SDL_GetHintBoolean(SDL_HINT_VIDEO_FORCE_EGL, SDL_FALSE))
#if SDL_VIDEO_OPENGL_GLX
&& ( !_this->gl_data || X11_GL_UseEGL(_this) )
#endif