1
0
Fork 0
mirror of https://github.com/gwm17/glfw.git synced 2024-11-26 20:28:49 -05:00

Renamed internal gamma function.

This commit is contained in:
Camilla Berglund 2010-10-13 22:42:31 +02:00
parent 2630d4968c
commit 85bcd1fa0c
3 changed files with 9 additions and 9 deletions

View File

@ -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

View File

@ -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
} }
} }

View File

@ -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);
} }