mirror of
https://github.com/glfw/glfw.git
synced 2026-09-21 16:44:11 +00:00
Added error messages.
This commit is contained in:
+11
-2
@@ -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;
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user