mirror of
https://github.com/glfw/glfw.git
synced 2024-11-22 21:14:35 +00:00
Made glfwGetGammaRamp act directly.
This commit is contained in:
parent
dba2d80009
commit
a910f53be2
@ -97,7 +97,6 @@ int _glfwPlatformInit(void)
|
|||||||
// Save the original gamma ramp
|
// Save the original gamma ramp
|
||||||
_glfw.originalRampSize = CGDisplayGammaTableCapacity(CGMainDisplayID());
|
_glfw.originalRampSize = CGDisplayGammaTableCapacity(CGMainDisplayID());
|
||||||
_glfwPlatformGetGammaRamp(&_glfw.originalRamp);
|
_glfwPlatformGetGammaRamp(&_glfw.originalRamp);
|
||||||
_glfw.currentRamp = _glfw.originalRamp;
|
|
||||||
|
|
||||||
_glfwInitTimer();
|
_glfwInitTimer();
|
||||||
|
|
||||||
|
@ -86,7 +86,7 @@ GLFWAPI void glfwGetGammaRamp(GLFWgammaramp* ramp)
|
|||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
*ramp = _glfw.currentRamp;
|
_glfwPlatformGetGammaRamp(ramp);
|
||||||
}
|
}
|
||||||
|
|
||||||
GLFWAPI void glfwSetGammaRamp(const GLFWgammaramp* ramp)
|
GLFWAPI void glfwSetGammaRamp(const GLFWgammaramp* ramp)
|
||||||
@ -98,7 +98,6 @@ GLFWAPI void glfwSetGammaRamp(const GLFWgammaramp* ramp)
|
|||||||
}
|
}
|
||||||
|
|
||||||
_glfwPlatformSetGammaRamp(ramp);
|
_glfwPlatformSetGammaRamp(ramp);
|
||||||
_glfw.currentRamp = *ramp;
|
|
||||||
_glfw.rampChanged = GL_TRUE;
|
_glfw.rampChanged = GL_TRUE;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -290,7 +290,6 @@ struct _GLFWlibrary
|
|||||||
int monitorCount;
|
int monitorCount;
|
||||||
GLFWmonitorfun monitorCallback;
|
GLFWmonitorfun monitorCallback;
|
||||||
|
|
||||||
GLFWgammaramp currentRamp;
|
|
||||||
GLFWgammaramp originalRamp;
|
GLFWgammaramp originalRamp;
|
||||||
int originalRampSize;
|
int originalRampSize;
|
||||||
GLboolean rampChanged;
|
GLboolean rampChanged;
|
||||||
|
@ -182,7 +182,6 @@ int _glfwPlatformInit(void)
|
|||||||
// Save the original gamma ramp
|
// Save the original gamma ramp
|
||||||
_glfw.originalRampSize = 256;
|
_glfw.originalRampSize = 256;
|
||||||
_glfwPlatformGetGammaRamp(&_glfw.originalRamp);
|
_glfwPlatformGetGammaRamp(&_glfw.originalRamp);
|
||||||
_glfw.currentRamp = _glfw.originalRamp;
|
|
||||||
|
|
||||||
if (!_glfwInitContextAPI())
|
if (!_glfwInitContextAPI())
|
||||||
return GL_FALSE;
|
return GL_FALSE;
|
||||||
|
@ -80,7 +80,6 @@ void _glfwInitGammaRamp(void)
|
|||||||
{
|
{
|
||||||
// Save the original gamma ramp
|
// Save the original gamma ramp
|
||||||
_glfwPlatformGetGammaRamp(&_glfw.originalRamp);
|
_glfwPlatformGetGammaRamp(&_glfw.originalRamp);
|
||||||
_glfw.currentRamp = _glfw.originalRamp;
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user