hints: Rename SDL_HINT_OPENGL_FORCE_SRGB_CAPABLE.

It's now SDL_HINT_OPENGL_FORCE_SRGB_FRAMEBUFFER, since it does more than mess
with the srgb-capable context attribute now.

Reference Issue #14898.
This commit is contained in:
Ryan C. Gordon
2026-02-13 14:31:45 -05:00
parent fc570a1a1c
commit 10b524c7cc
6 changed files with 6 additions and 6 deletions

View File

@@ -3078,7 +3078,7 @@ extern "C" {
*
* \since This hint is available since SDL 3.4.2.
*/
#define SDL_HINT_OPENGL_FORCE_SRGB_CAPABLE "SDL_OPENGL_FORCE_SRGB_CAPABLE"
#define SDL_HINT_OPENGL_FORCE_SRGB_FRAMEBUFFER "SDL_OPENGL_FORCE_SRGB_FRAMEBUFFER"
/**
* Mechanism to specify openvr_api library location

View File

@@ -1291,7 +1291,7 @@ EGLSurface SDL_EGL_CreateSurface(SDL_VideoDevice *_this, SDL_Window *window, Nat
#ifdef EGL_KHR_gl_colorspace
if (SDL_EGL_HasExtension(_this, SDL_EGL_DISPLAY_EXTENSION, "EGL_KHR_gl_colorspace")) {
const char *srgbhint = SDL_GetHint(SDL_HINT_OPENGL_FORCE_SRGB_CAPABLE);
const char *srgbhint = SDL_GetHint(SDL_HINT_OPENGL_FORCE_SRGB_FRAMEBUFFER);
if (srgbhint && *srgbhint) {
if (SDL_strcmp(srgbhint, "skip") == 0) {
// don't set an attribute at all.

View File

@@ -5396,7 +5396,7 @@ SDL_GLContext SDL_GL_CreateContext(SDL_Window *window)
#if defined(SDL_VIDEO_OPENGL) || defined(SDL_VIDEO_OPENGL_ES) || defined(SDL_VIDEO_OPENGL_ES2)
int srgb_requested = -1;
const char *srgbhint = SDL_GetHint(SDL_HINT_OPENGL_FORCE_SRGB_CAPABLE);
const char *srgbhint = SDL_GetHint(SDL_HINT_OPENGL_FORCE_SRGB_FRAMEBUFFER);
if (srgbhint && *srgbhint) {
srgb_requested = SDL_GetStringBoolean(srgbhint, false) ? 1 : 0;
}

View File

@@ -155,7 +155,7 @@ SDL_GLContext UIKit_GL_CreateContext(SDL_VideoDevice *_this, SDL_Window *window)
}
int srgb = _this->gl_config.framebuffer_srgb_capable;
const char *srgbhint = SDL_GetHint(SDL_HINT_OPENGL_FORCE_SRGB_CAPABLE);
const char *srgbhint = SDL_GetHint(SDL_HINT_OPENGL_FORCE_SRGB_FRAMEBUFFER);
if (srgbhint && *srgbhint) {
srgb = SDL_GetStringBoolean(srgbhint, false) ? 1 : 0; // there is no "skip" here, since initWithFrame expects it, so we'll treat it as false.
}

View File

@@ -661,7 +661,7 @@ static bool WIN_GL_SetupWindowInternal(SDL_VideoDevice *_this, SDL_Window *windo
}
if (_this->gl_data->HAS_WGL_ARB_framebuffer_sRGB) {
const char *srgbhint = SDL_GetHint(SDL_HINT_OPENGL_FORCE_SRGB_CAPABLE);
const char *srgbhint = SDL_GetHint(SDL_HINT_OPENGL_FORCE_SRGB_FRAMEBUFFER);
if (srgbhint && *srgbhint) {
if (SDL_strcmp(srgbhint, "skip") == 0) {
// don't set an attribute at all.

View File

@@ -585,7 +585,7 @@ static int X11_GL_GetAttributes(SDL_VideoDevice *_this, Display *display, int sc
}
if (_this->gl_data->HAS_GLX_ARB_framebuffer_sRGB) {
const char *srgbhint = SDL_GetHint(SDL_HINT_OPENGL_FORCE_SRGB_CAPABLE);
const char *srgbhint = SDL_GetHint(SDL_HINT_OPENGL_FORCE_SRGB_FRAMEBUFFER);
if (srgbhint && *srgbhint) {
if (SDL_strcmp(srgbhint, "skip") == 0) {
// don't set an attribute at all.