Added error messages.

master
Camilla Berglund ago%!(EXTRA string=14 years)
parent 02200c635e
commit c18eda3a1a
  1. 13
      src/fullscreen.c

@ -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…
Cancel
Save