mirror of
https://github.com/glfw/glfw.git
synced 2026-09-20 08:23:13 +00:00
Ensure out arguments are always set.
This commit is contained in:
@@ -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)
|
||||
|
||||
Reference in New Issue
Block a user