mirror of
https://github.com/Ryujinx/SDL.git
synced 2025-01-03 17:35:30 +00:00
Set framebuffer_srgb_capable to the actual value obtained (#8634)
This commit is contained in:
parent
8d47e3bb82
commit
594a79c2f9
|
@ -527,6 +527,9 @@ static int WIN_GL_ChoosePixelFormatARB(_THIS, int *iAttribs, float *fAttribs)
|
||||||
int pixel_format = 0;
|
int pixel_format = 0;
|
||||||
unsigned int matching;
|
unsigned int matching;
|
||||||
|
|
||||||
|
int qAttrib = WGL_FRAMEBUFFER_SRGB_CAPABLE_ARB;
|
||||||
|
int srgb = 0;
|
||||||
|
|
||||||
hwnd =
|
hwnd =
|
||||||
CreateWindow(SDL_Appname, SDL_Appname, (WS_POPUP | WS_DISABLED), 0, 0,
|
CreateWindow(SDL_Appname, SDL_Appname, (WS_POPUP | WS_DISABLED), 0, 0,
|
||||||
10, 10, NULL, NULL, SDL_Instance, NULL);
|
10, 10, NULL, NULL, SDL_Instance, NULL);
|
||||||
|
@ -548,6 +551,10 @@ static int WIN_GL_ChoosePixelFormatARB(_THIS, int *iAttribs, float *fAttribs)
|
||||||
&matching);
|
&matching);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/* Check whether we actually got an SRGB capable buffer */
|
||||||
|
_this->gl_data->wglGetPixelFormatAttribivARB(hdc, pixel_format, 0, 1, &qAttrib, &srgb);
|
||||||
|
_this->gl_config.framebuffer_srgb_capable = srgb;
|
||||||
|
|
||||||
_this->gl_data->wglMakeCurrent(hdc, NULL);
|
_this->gl_data->wglMakeCurrent(hdc, NULL);
|
||||||
_this->gl_data->wglDeleteContext(hglrc);
|
_this->gl_data->wglDeleteContext(hglrc);
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue