From a910f53be2e83f4fab34d552ae0ac62b35d2a810 Mon Sep 17 00:00:00 2001 From: Camilla Berglund Date: Thu, 17 Jan 2013 23:31:22 +0100 Subject: [PATCH] Made glfwGetGammaRamp act directly. --- src/cocoa_init.m | 1 - src/gamma.c | 3 +-- src/internal.h | 1 - src/win32_init.c | 1 - src/x11_gamma.c | 1 - 5 files changed, 1 insertion(+), 6 deletions(-) diff --git a/src/cocoa_init.m b/src/cocoa_init.m index 90f599bd..bffa4fa6 100644 --- a/src/cocoa_init.m +++ b/src/cocoa_init.m @@ -97,7 +97,6 @@ int _glfwPlatformInit(void) // Save the original gamma ramp _glfw.originalRampSize = CGDisplayGammaTableCapacity(CGMainDisplayID()); _glfwPlatformGetGammaRamp(&_glfw.originalRamp); - _glfw.currentRamp = _glfw.originalRamp; _glfwInitTimer(); diff --git a/src/gamma.c b/src/gamma.c index 3a239c81..b3ca7daf 100644 --- a/src/gamma.c +++ b/src/gamma.c @@ -86,7 +86,7 @@ GLFWAPI void glfwGetGammaRamp(GLFWgammaramp* ramp) return; } - *ramp = _glfw.currentRamp; + _glfwPlatformGetGammaRamp(ramp); } GLFWAPI void glfwSetGammaRamp(const GLFWgammaramp* ramp) @@ -98,7 +98,6 @@ GLFWAPI void glfwSetGammaRamp(const GLFWgammaramp* ramp) } _glfwPlatformSetGammaRamp(ramp); - _glfw.currentRamp = *ramp; _glfw.rampChanged = GL_TRUE; } diff --git a/src/internal.h b/src/internal.h index 8ddcfa83..b80fd74a 100644 --- a/src/internal.h +++ b/src/internal.h @@ -290,7 +290,6 @@ struct _GLFWlibrary int monitorCount; GLFWmonitorfun monitorCallback; - GLFWgammaramp currentRamp; GLFWgammaramp originalRamp; int originalRampSize; GLboolean rampChanged; diff --git a/src/win32_init.c b/src/win32_init.c index 991ca44b..eba49574 100644 --- a/src/win32_init.c +++ b/src/win32_init.c @@ -182,7 +182,6 @@ int _glfwPlatformInit(void) // Save the original gamma ramp _glfw.originalRampSize = 256; _glfwPlatformGetGammaRamp(&_glfw.originalRamp); - _glfw.currentRamp = _glfw.originalRamp; if (!_glfwInitContextAPI()) return GL_FALSE; diff --git a/src/x11_gamma.c b/src/x11_gamma.c index f2a75613..f2f56b48 100644 --- a/src/x11_gamma.c +++ b/src/x11_gamma.c @@ -80,7 +80,6 @@ void _glfwInitGammaRamp(void) { // Save the original gamma ramp _glfwPlatformGetGammaRamp(&_glfw.originalRamp); - _glfw.currentRamp = _glfw.originalRamp; } }