Added error messages.

This commit is contained in:
Camilla Berglund 2011-10-04 01:06:43 +02:00
parent 02200c635e
commit c18eda3a1a

View File

@ -110,9 +110,18 @@ GLFWAPI int glfwGetVideoModes(GLFWvidmode* list, int maxcount)
return 0;
}
if (maxcount <= 0 || list == NULL)
if (maxcount <= 0)
{
// TODO: Figure out if this is an error
_glfwSetError(GLFW_INVALID_VALUE,
"glfwGetVideoModes: Parameter 'maxcount' must be "
"greater than zero");
return 0;
}
if (list == NULL)
{
_glfwSetError(GLFW_INVALID_VALUE,
"glfwGetVideoModes: Parameter 'list' cannot be NULL");
return 0;
}