1
0
Fork 0
mirror of https://github.com/gwm17/glfw.git synced 2024-11-23 10:48:51 -05:00

Ignore gamma ramp get/set capabilities if size is not GLFW_GAMMA_RAMP_SIZE, similar to what happens currently for the Cocoa implementation.

This commit is contained in:
Braden Pellett 2012-05-31 17:01:24 -07:00
parent 322407ae9f
commit 2558da0b59

View File

@ -111,6 +111,10 @@ void _glfwTerminateGammaRamp(void)
void _glfwPlatformGetGammaRamp(GLFWgammaramp* ramp) void _glfwPlatformGetGammaRamp(GLFWgammaramp* ramp)
{ {
// For now, don't support anything that is not GLFW_GAMMA_RAMP_SIZE
if (_glfwLibrary.originalRampSize != GLFW_GAMMA_RAMP_SIZE)
return;
if (_glfwLibrary.X11.RandR.available && if (_glfwLibrary.X11.RandR.available &&
!_glfwLibrary.X11.RandR.gammaBroken) !_glfwLibrary.X11.RandR.gammaBroken)
{ {
@ -153,6 +157,10 @@ void _glfwPlatformGetGammaRamp(GLFWgammaramp* ramp)
void _glfwPlatformSetGammaRamp(const GLFWgammaramp* ramp) void _glfwPlatformSetGammaRamp(const GLFWgammaramp* ramp)
{ {
// For now, don't support anything that is not GLFW_GAMMA_RAMP_SIZE
if (_glfwLibrary.originalRampSize != GLFW_GAMMA_RAMP_SIZE)
return;
if (_glfwLibrary.X11.RandR.available && if (_glfwLibrary.X11.RandR.available &&
!_glfwLibrary.X11.RandR.gammaBroken) !_glfwLibrary.X11.RandR.gammaBroken)
{ {