1
0
Fork 0
mirror of https://github.com/gwm17/glfw.git synced 2024-10-08 07:07:25 -04:00

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; 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; return 0;
} }