1
0
Fork 0
mirror of https://github.com/gwm17/glfw.git synced 2024-11-27 04:28:52 -05:00

Merge branch 'master' of github.com:elmindreda/glfw

This commit is contained in:
Camilla Berglund 2012-06-03 16:09:41 +02:00
commit 9d5a95add8

View File

@ -111,6 +111,15 @@ void _glfwTerminateGammaRamp(void)
void _glfwPlatformGetGammaRamp(GLFWgammaramp* ramp)
{
// For now, don't support anything that is not GLFW_GAMMA_RAMP_SIZE
if (_glfwLibrary.originalRampSize != GLFW_GAMMA_RAMP_SIZE)
{
_glfwSetError(GLFW_PLATFORM_ERROR,
"X11/GLX: Failed to get gamma ramp due to size "
"incompatibility");
return;
}
if (_glfwLibrary.X11.RandR.available &&
!_glfwLibrary.X11.RandR.gammaBroken)
{
@ -153,6 +162,15 @@ void _glfwPlatformGetGammaRamp(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)
{
_glfwSetError(GLFW_PLATFORM_ERROR,
"X11/GLX: Failed to set gamma ramp due to size "
"incompatibility");
return;
}
if (_glfwLibrary.X11.RandR.available &&
!_glfwLibrary.X11.RandR.gammaBroken)
{