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