mirror of
https://github.com/glfw/glfw.git
synced 2024-11-12 17:51:48 +00: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);
|
void _glfwPlatformGetDesktopMode(GLFWvidmode* mode);
|
||||||
|
|
||||||
// Gamma ramp
|
// Gamma ramp
|
||||||
void _glfwPlatformSaveGammaRamp(void);
|
void _glfwPlatformGetGammaRamp(GLFWgammaramp* ramp);
|
||||||
void _glfwPlatformSetGammaRamp(const GLFWgammaramp* ramp);
|
void _glfwPlatformSetGammaRamp(const GLFWgammaramp* ramp);
|
||||||
|
|
||||||
// Joystick
|
// Joystick
|
||||||
|
@ -41,7 +41,7 @@
|
|||||||
// Save the original gamma ramp so that we can restore it later
|
// Save the original gamma ramp so that we can restore it later
|
||||||
//========================================================================
|
//========================================================================
|
||||||
|
|
||||||
void _glfwPlatformSaveGammaRamp(void)
|
void _glfwPlatformGetGammaRamp(GLFWgammaramp* ramp)
|
||||||
{
|
{
|
||||||
if (_glfwLibrary.X11.XRandR.available &&
|
if (_glfwLibrary.X11.XRandR.available &&
|
||||||
!_glfwLibrary.X11.XRandR.gammaBroken)
|
!_glfwLibrary.X11.XRandR.gammaBroken)
|
||||||
@ -55,9 +55,9 @@ void _glfwPlatformSaveGammaRamp(void)
|
|||||||
XRRCrtcGamma* gamma = XRRGetCrtcGamma(_glfwLibrary.X11.display,
|
XRRCrtcGamma* gamma = XRRGetCrtcGamma(_glfwLibrary.X11.display,
|
||||||
rr->crtcs[0]);
|
rr->crtcs[0]);
|
||||||
|
|
||||||
memcpy(_glfwLibrary.originalRamp.red, gamma->red, size);
|
memcpy(ramp->red, gamma->red, size);
|
||||||
memcpy(_glfwLibrary.originalRamp.green, gamma->green, size);
|
memcpy(ramp->green, gamma->green, size);
|
||||||
memcpy(_glfwLibrary.originalRamp.blue, gamma->blue, size);
|
memcpy(ramp->blue, gamma->blue, size);
|
||||||
|
|
||||||
XRRFreeGamma(gamma);
|
XRRFreeGamma(gamma);
|
||||||
XRRFreeScreenResources(rr);
|
XRRFreeScreenResources(rr);
|
||||||
@ -69,9 +69,9 @@ void _glfwPlatformSaveGammaRamp(void)
|
|||||||
XF86VidModeGetGammaRamp(_glfwLibrary.X11.display,
|
XF86VidModeGetGammaRamp(_glfwLibrary.X11.display,
|
||||||
_glfwLibrary.X11.screen,
|
_glfwLibrary.X11.screen,
|
||||||
GLFW_GAMMA_RAMP_SIZE,
|
GLFW_GAMMA_RAMP_SIZE,
|
||||||
_glfwLibrary.originalRamp.red,
|
ramp->red,
|
||||||
_glfwLibrary.originalRamp.green,
|
ramp->green,
|
||||||
_glfwLibrary.originalRamp.blue);
|
ramp->blue);
|
||||||
#endif
|
#endif
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -178,7 +178,7 @@ static void initGammaRamp(void)
|
|||||||
fprintf(stderr, "Gamma ramp setting unsupported\n");
|
fprintf(stderr, "Gamma ramp setting unsupported\n");
|
||||||
|
|
||||||
// Save the original gamma ramp
|
// Save the original gamma ramp
|
||||||
_glfwPlatformSaveGammaRamp();
|
_glfwPlatformGetGammaRamp(&_glfwLibrary.originalRamp);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user