mirror of
https://github.com/glfw/glfw.git
synced 2024-11-26 06:14:35 +00:00
Added error messages.
This commit is contained in:
parent
02200c635e
commit
c18eda3a1a
@ -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;
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user