Ensure out arguments are always set.

This commit is contained in:
Camilla Berglund
2014-04-07 15:28:32 +02:00
parent eaff0f73d1
commit b29fbc82c2
4 changed files with 44 additions and 11 deletions
+12
View File
@@ -295,7 +295,14 @@ GLFWAPI GLFWmonitor* glfwGetPrimaryMonitor(void)
GLFWAPI void glfwGetMonitorPos(GLFWmonitor* handle, int* xpos, int* ypos)
{
_GLFWmonitor* monitor = (_GLFWmonitor*) handle;
if (xpos)
*xpos = 0;
if (ypos)
*ypos = 0;
_GLFW_REQUIRE_INIT();
_glfwPlatformGetMonitorPos(monitor, xpos, ypos);
}
@@ -303,6 +310,11 @@ GLFWAPI void glfwGetMonitorPhysicalSize(GLFWmonitor* handle, int* width, int* he
{
_GLFWmonitor* monitor = (_GLFWmonitor*) handle;
if (width)
*width = 0;
if (height)
height = 0;
_GLFW_REQUIRE_INIT();
if (width)