mirror of
https://github.com/gwm17/glfw.git
synced 2024-11-26 12:18:51 -05:00
Renamed internal gamma function.
This commit is contained in:
parent
2630d4968c
commit
85bcd1fa0c
|
@ -262,7 +262,7 @@ int _glfwPlatformGetVideoModes(GLFWvidmode* list, int maxcount);
|
|||
void _glfwPlatformGetDesktopMode(GLFWvidmode* mode);
|
||||
|
||||
// Gamma ramp
|
||||
void _glfwPlatformSaveGammaRamp(void);
|
||||
void _glfwPlatformGetGammaRamp(GLFWgammaramp* ramp);
|
||||
void _glfwPlatformSetGammaRamp(const GLFWgammaramp* ramp);
|
||||
|
||||
// Joystick
|
||||
|
|
|
@ -41,7 +41,7 @@
|
|||
// Save the original gamma ramp so that we can restore it later
|
||||
//========================================================================
|
||||
|
||||
void _glfwPlatformSaveGammaRamp(void)
|
||||
void _glfwPlatformGetGammaRamp(GLFWgammaramp* ramp)
|
||||
{
|
||||
if (_glfwLibrary.X11.XRandR.available &&
|
||||
!_glfwLibrary.X11.XRandR.gammaBroken)
|
||||
|
@ -55,9 +55,9 @@ void _glfwPlatformSaveGammaRamp(void)
|
|||
XRRCrtcGamma* gamma = XRRGetCrtcGamma(_glfwLibrary.X11.display,
|
||||
rr->crtcs[0]);
|
||||
|
||||
memcpy(_glfwLibrary.originalRamp.red, gamma->red, size);
|
||||
memcpy(_glfwLibrary.originalRamp.green, gamma->green, size);
|
||||
memcpy(_glfwLibrary.originalRamp.blue, gamma->blue, size);
|
||||
memcpy(ramp->red, gamma->red, size);
|
||||
memcpy(ramp->green, gamma->green, size);
|
||||
memcpy(ramp->blue, gamma->blue, size);
|
||||
|
||||
XRRFreeGamma(gamma);
|
||||
XRRFreeScreenResources(rr);
|
||||
|
@ -69,9 +69,9 @@ void _glfwPlatformSaveGammaRamp(void)
|
|||
XF86VidModeGetGammaRamp(_glfwLibrary.X11.display,
|
||||
_glfwLibrary.X11.screen,
|
||||
GLFW_GAMMA_RAMP_SIZE,
|
||||
_glfwLibrary.originalRamp.red,
|
||||
_glfwLibrary.originalRamp.green,
|
||||
_glfwLibrary.originalRamp.blue);
|
||||
ramp->red,
|
||||
ramp->green,
|
||||
ramp->blue);
|
||||
#endif
|
||||
}
|
||||
}
|
||||
|
|
|
@ -178,7 +178,7 @@ static void initGammaRamp(void)
|
|||
fprintf(stderr, "Gamma ramp setting unsupported\n");
|
||||
|
||||
// Save the original gamma ramp
|
||||
_glfwPlatformSaveGammaRamp();
|
||||
_glfwPlatformGetGammaRamp(&_glfwLibrary.originalRamp);
|
||||
}
|
||||
|
||||
|
||||
|
|
Loading…
Reference in New Issue
Block a user