mirror of
https://github.com/libsdl-org/SDL.git
synced 2025-05-25 22:19:10 +00:00
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:
parent
346eeba210
commit
873ec097ea
6 changed files with 13 additions and 44 deletions
|
@ -158,3 +158,10 @@ SDL_GetRevisionNumber() has been removed from the API, it always returned 0 in S
|
||||||
SDL_SetWindowBrightness and SDL_SetWindowGammaRamp have been removed from the API, because they interact poorly with modern operating systems and aren't able to limit their effects to the SDL window.
|
SDL_SetWindowBrightness and SDL_SetWindowGammaRamp have been removed from the API, because they interact poorly with modern operating systems and aren't able to limit their effects to the SDL window.
|
||||||
|
|
||||||
Programs which have access to shaders can implement more robust versions of those functions using custom shader code rendered as a post-process effect.
|
Programs which have access to shaders can implement more robust versions of those functions using custom shader code rendered as a post-process effect.
|
||||||
|
|
||||||
|
## SDL_hints.h
|
||||||
|
|
||||||
|
The following hints have been removed:
|
||||||
|
* SDL_HINT_VIDEO_X11_FORCE_EGL (use SDL_HINT_VIDEO_FORCE_EGL instead)
|
||||||
|
* SDL_HINT_VIDEO_X11_XINERAMA (Xinerama no longer supported by the X11 backend)
|
||||||
|
* SDL_HINT_VIDEO_X11_XVIDMODE (Xvidmode no longer supported by the X11 backend)
|
||||||
|
|
|
@ -1835,20 +1835,6 @@ extern "C" {
|
||||||
*/
|
*/
|
||||||
#define SDL_HINT_VIDEO_FORCE_EGL "SDL_VIDEO_FORCE_EGL"
|
#define SDL_HINT_VIDEO_FORCE_EGL "SDL_VIDEO_FORCE_EGL"
|
||||||
|
|
||||||
/**
|
|
||||||
* \brief A variable controlling whether X11 should use GLX or EGL by default
|
|
||||||
*
|
|
||||||
* This variable can be set to the following values:
|
|
||||||
* "0" - Use GLX
|
|
||||||
* "1" - Use EGL
|
|
||||||
*
|
|
||||||
* By default SDL will use GLX when both are present.
|
|
||||||
*
|
|
||||||
* \deprecated Use the platform-agnostic SDL_HINT_VIDEO_FORCE_EGL hint instead.
|
|
||||||
*
|
|
||||||
*/
|
|
||||||
#define SDL_HINT_VIDEO_X11_FORCE_EGL "SDL_VIDEO_X11_FORCE_EGL"
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* \brief A variable controlling whether the X11 _NET_WM_BYPASS_COMPOSITOR hint should be used.
|
* \brief A variable controlling whether the X11 _NET_WM_BYPASS_COMPOSITOR hint should be used.
|
||||||
*
|
*
|
||||||
|
@ -1881,15 +1867,6 @@ extern "C" {
|
||||||
*/
|
*/
|
||||||
#define SDL_HINT_VIDEO_X11_WINDOW_VISUALID "SDL_VIDEO_X11_WINDOW_VISUALID"
|
#define SDL_HINT_VIDEO_X11_WINDOW_VISUALID "SDL_VIDEO_X11_WINDOW_VISUALID"
|
||||||
|
|
||||||
/**
|
|
||||||
* \brief A no-longer-used variable controlling whether the X11 Xinerama extension should be used.
|
|
||||||
*
|
|
||||||
* Before SDL 2.0.24, this would let apps and users disable Xinerama support on X11.
|
|
||||||
* Now SDL never uses Xinerama, and does not check for this hint at all.
|
|
||||||
* The preprocessor define is left here for source compatibility.
|
|
||||||
*/
|
|
||||||
#define SDL_HINT_VIDEO_X11_XINERAMA "SDL_VIDEO_X11_XINERAMA"
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* \brief A variable controlling whether the X11 XRandR extension should be used.
|
* \brief A variable controlling whether the X11 XRandR extension should be used.
|
||||||
*
|
*
|
||||||
|
@ -1901,15 +1878,6 @@ extern "C" {
|
||||||
*/
|
*/
|
||||||
#define SDL_HINT_VIDEO_X11_XRANDR "SDL_VIDEO_X11_XRANDR"
|
#define SDL_HINT_VIDEO_X11_XRANDR "SDL_VIDEO_X11_XRANDR"
|
||||||
|
|
||||||
/**
|
|
||||||
* \brief A no-longer-used variable controlling whether the X11 VidMode extension should be used.
|
|
||||||
*
|
|
||||||
* Before SDL 2.0.24, this would let apps and users disable XVidMode support on X11.
|
|
||||||
* Now SDL never uses XVidMode, and does not check for this hint at all.
|
|
||||||
* The preprocessor define is left here for source compatibility.
|
|
||||||
*/
|
|
||||||
#define SDL_HINT_VIDEO_X11_XVIDMODE "SDL_VIDEO_X11_XVIDMODE"
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* \brief Controls how the fact chunk affects the loading of a WAVE file.
|
* \brief Controls how the fact chunk affects the loading of a WAVE 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
|
* GLX_EXT_create_context_es2_profile extension, switch over to X11_GLES functions
|
||||||
*/
|
*/
|
||||||
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) ||
|
SDL_GetHintBoolean(SDL_HINT_VIDEO_FORCE_EGL, SDL_FALSE)) &&
|
||||||
SDL_GetHintBoolean(SDL_HINT_VIDEO_X11_FORCE_EGL, SDL_FALSE)) &&
|
|
||||||
X11_GL_UseEGL(_this) ) {
|
X11_GL_UseEGL(_this) ) {
|
||||||
#if SDL_VIDEO_OPENGL_EGL
|
#if SDL_VIDEO_OPENGL_EGL
|
||||||
X11_GL_UnloadLibrary(_this);
|
X11_GL_UnloadLibrary(_this);
|
||||||
|
@ -690,9 +689,7 @@ SDL_bool
|
||||||
X11_GL_UseEGL(_THIS)
|
X11_GL_UseEGL(_THIS)
|
||||||
{
|
{
|
||||||
SDL_assert(_this->gl_data != NULL);
|
SDL_assert(_this->gl_data != NULL);
|
||||||
if (SDL_GetHintBoolean(SDL_HINT_VIDEO_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 */
|
/* use of EGL has been requested, even for desktop GL */
|
||||||
return SDL_TRUE;
|
return SDL_TRUE;
|
||||||
}
|
}
|
||||||
|
|
|
@ -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 the profile requested is not GL ES, switch over to X11_GL functions */
|
||||||
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) &&
|
!SDL_GetHintBoolean(SDL_HINT_VIDEO_FORCE_EGL, SDL_FALSE)) {
|
||||||
!SDL_GetHintBoolean(SDL_HINT_VIDEO_X11_FORCE_EGL, SDL_FALSE)) {
|
|
||||||
#if SDL_VIDEO_OPENGL_GLX
|
#if SDL_VIDEO_OPENGL_GLX
|
||||||
X11_GLES_UnloadLibrary(_this);
|
X11_GLES_UnloadLibrary(_this);
|
||||||
_this->GL_LoadLibrary = X11_GL_LoadLibrary;
|
_this->GL_LoadLibrary = X11_GL_LoadLibrary;
|
||||||
|
|
|
@ -287,8 +287,7 @@ X11_CreateDevice(void)
|
||||||
#endif
|
#endif
|
||||||
#if SDL_VIDEO_OPENGL_EGL
|
#if SDL_VIDEO_OPENGL_EGL
|
||||||
#if SDL_VIDEO_OPENGL_GLX
|
#if SDL_VIDEO_OPENGL_GLX
|
||||||
if (SDL_GetHintBoolean(SDL_HINT_VIDEO_FORCE_EGL, SDL_FALSE) ||
|
if (SDL_GetHintBoolean(SDL_HINT_VIDEO_FORCE_EGL, SDL_FALSE)) {
|
||||||
SDL_GetHintBoolean(SDL_HINT_VIDEO_X11_FORCE_EGL, SDL_FALSE)) {
|
|
||||||
#endif
|
#endif
|
||||||
device->GL_LoadLibrary = X11_GLES_LoadLibrary;
|
device->GL_LoadLibrary = X11_GLES_LoadLibrary;
|
||||||
device->GL_GetProcAddress = X11_GLES_GetProcAddress;
|
device->GL_GetProcAddress = X11_GLES_GetProcAddress;
|
||||||
|
|
|
@ -431,8 +431,7 @@ X11_CreateWindow(_THIS, SDL_Window * window)
|
||||||
|
|
||||||
#if SDL_VIDEO_OPENGL_EGL
|
#if SDL_VIDEO_OPENGL_EGL
|
||||||
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) ||
|
SDL_GetHintBoolean(SDL_HINT_VIDEO_FORCE_EGL, SDL_FALSE))
|
||||||
SDL_GetHintBoolean(SDL_HINT_VIDEO_X11_FORCE_EGL, SDL_FALSE))
|
|
||||||
#if SDL_VIDEO_OPENGL_GLX
|
#if SDL_VIDEO_OPENGL_GLX
|
||||||
&& ( !_this->gl_data || X11_GL_UseEGL(_this) )
|
&& ( !_this->gl_data || X11_GL_UseEGL(_this) )
|
||||||
#endif
|
#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 SDL_VIDEO_OPENGL_ES || SDL_VIDEO_OPENGL_ES2 || SDL_VIDEO_OPENGL_EGL
|
||||||
if ((window->flags & SDL_WINDOW_OPENGL) &&
|
if ((window->flags & SDL_WINDOW_OPENGL) &&
|
||||||
((_this->gl_config.profile_mask == SDL_GL_CONTEXT_PROFILE_ES) ||
|
((_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
|
#if SDL_VIDEO_OPENGL_GLX
|
||||||
&& ( !_this->gl_data || X11_GL_UseEGL(_this) )
|
&& ( !_this->gl_data || X11_GL_UseEGL(_this) )
|
||||||
#endif
|
#endif
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue