mirror of
https://github.com/glfw/glfw.git
synced 2024-11-29 15:44:35 +00:00
Added gamma value error check.
This commit is contained in:
parent
2f4d75bd15
commit
62f812873c
@ -52,6 +52,13 @@ GLFWAPI void glfwSetGamma(float gamma)
|
|||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if (gamma <= 0.f)
|
||||||
|
{
|
||||||
|
_glfwSetError(GLFW_INVALID_VALUE,
|
||||||
|
"glfwSetGamma: Gamma value must be greater than zero");
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
for (i = 0; i < size; i++)
|
for (i = 0; i < size; i++)
|
||||||
{
|
{
|
||||||
float value = (float) i / ((float) (size - 1));
|
float value = (float) i / ((float) (size - 1));
|
||||||
|
Loading…
Reference in New Issue
Block a user