Added missing ramp array allocation.

This commit is contained in:
Camilla Berglund 2013-06-09 18:17:47 +02:00
parent 68b7ea86d2
commit 52354bf382

View File

@ -50,11 +50,11 @@ void _glfwPlatformGetGammaRamp(_GLFWmonitor* monitor, GLFWgammaramp* ramp)
GetDeviceGammaRamp(dc, values);
DeleteDC(dc);
_glfwAllocGammaRamp(ramp, 256);
memcpy(ramp->red, values + 0, 256 * sizeof(unsigned short));
memcpy(ramp->green, values + 256, 256 * sizeof(unsigned short));
memcpy(ramp->blue, values + 512, 256 * sizeof(unsigned short));
ramp->size = 256;
}
void _glfwPlatformSetGammaRamp(_GLFWmonitor* monitor, const GLFWgammaramp* ramp)