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
+5 -1
View File
@@ -319,11 +319,15 @@ GLFWAPI void glfwGetCursorPos(GLFWwindow* handle, double* xpos, double* ypos)
{
_GLFWwindow* window = (_GLFWwindow*) handle;
if (xpos)
*xpos = 0;
if (ypos)
*ypos = 0;
_GLFW_REQUIRE_INIT();
if (xpos)
*xpos = window->cursorPosX;
if (ypos)
*ypos = window->cursorPosY;
}