Add validation of size limit and aspect ratio args

This commit is contained in:
Camilla Berglund
2016-05-04 16:28:08 +02:00
parent e640d840b7
commit 12a695696d
2 changed files with 18 additions and 8 deletions

View File

@@ -2056,6 +2056,9 @@ GLFWAPI void glfwGetWindowSize(GLFWwindow* window, int* width, int* height);
* The size limits are applied immediately to a windowed mode window and may
* cause it to be resized.
*
* The maximum dimensions must be greater than or equal to the minimum
* dimensions and all must be greater than or equal to zero.
*
* @param[in] window The window to set limits for.
* @param[in] minwidth The minimum width, in screen coordinates, of the client
* area, or `GLFW_DONT_CARE`.
@@ -2066,8 +2069,8 @@ GLFWAPI void glfwGetWindowSize(GLFWwindow* window, int* width, int* height);
* @param[in] maxheight The maximum height, in screen coordinates, of the
* client area, or `GLFW_DONT_CARE`.
*
* @errors Possible errors include @ref GLFW_NOT_INITIALIZED and @ref
* GLFW_PLATFORM_ERROR.
* @errors Possible errors include @ref GLFW_NOT_INITIALIZED, @ref
* GLFW_INVALID_VALUE and @ref GLFW_PLATFORM_ERROR.
*
* @remark If you set size limits and an aspect ratio that conflict, the
* results are undefined.