From c18eda3a1a7fe805a851cf6cd16a8411025e0d49 Mon Sep 17 00:00:00 2001 From: Camilla Berglund Date: Tue, 4 Oct 2011 01:06:43 +0200 Subject: [PATCH] Added error messages. --- src/fullscreen.c | 13 +++++++++++-- 1 file changed, 11 insertions(+), 2 deletions(-) diff --git a/src/fullscreen.c b/src/fullscreen.c index 7cc96bb7..631f6193 100644 --- a/src/fullscreen.c +++ b/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; }