1
0
Fork 0
mirror of https://github.com/gwm17/glfw.git synced 2024-11-27 04:28:52 -05:00

Added gamma value error check.

This commit is contained in:
Camilla Berglund 2011-09-06 15:47:17 +02:00
parent 2f4d75bd15
commit 62f812873c

View File

@ -52,6 +52,13 @@ GLFWAPI void glfwSetGamma(float gamma)
return;
}
if (gamma <= 0.f)
{
_glfwSetError(GLFW_INVALID_VALUE,
"glfwSetGamma: Gamma value must be greater than zero");
return;
}
for (i = 0; i < size; i++)
{
float value = (float) i / ((float) (size - 1));