Added glfwGetWindowPos.

This commit is contained in:
Camilla Berglund
2010-09-14 03:53:22 +02:00
parent f0033aa47f
commit 318f731e3e
6 changed files with 34 additions and 0 deletions
+20
View File
@@ -807,6 +807,26 @@ GLFWAPI void glfwSetWindowSize(GLFWwindow window, int width, int height)
}
//========================================================================
// Get the window position
//========================================================================
GLFWAPI void glfwGetWindowPos(GLFWwindow window, int* x, int* y)
{
if (!_glfwInitialized)
{
_glfwSetError(GLFW_NOT_INITIALIZED);
return;
}
if (x != NULL)
*x = window->positionX;
if (y != NULL)
*y = window->positionY;
}
//========================================================================
// Set the window position
//========================================================================