mirror of
https://github.com/glfw/glfw.git
synced 2026-09-18 22:55:46 +00:00
Added glfwGetWindowPos.
This commit is contained in:
@@ -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
|
||||
//========================================================================
|
||||
|
||||
Reference in New Issue
Block a user