mirror of
https://github.com/glfw/glfw.git
synced 2025-10-04 13:46:37 +00:00
Added cocoa NULL argument checks and fixed height/width issue.
This commit is contained in:
parent
51a8667fcb
commit
61e2d23502
@ -372,10 +372,14 @@ void _glfwPlatformGetMonitorWorkarea(_GLFWmonitor* monitor, int* xpos, int* ypos
|
|||||||
|
|
||||||
NSRect frameRect = [[NSScreen resultScreen] visibleFrame];
|
NSRect frameRect = [[NSScreen resultScreen] visibleFrame];
|
||||||
|
|
||||||
|
if (xpos)
|
||||||
*xpos = NSMinX(frameRect);
|
*xpos = NSMinX(frameRect);
|
||||||
|
if (ypos)
|
||||||
*ypos = NSMinY(frameRect);
|
*ypos = NSMinY(frameRect);
|
||||||
*width = NSMaxX(frameRect);
|
if (width)
|
||||||
*height = NSMaxY(frameRect);
|
*width = NSWidth(frameRect);
|
||||||
|
if (height)
|
||||||
|
*height = NSHeight(frameRect);
|
||||||
}
|
}
|
||||||
|
|
||||||
GLFWvidmode* _glfwPlatformGetVideoModes(_GLFWmonitor* monitor, int* count)
|
GLFWvidmode* _glfwPlatformGetVideoModes(_GLFWmonitor* monitor, int* count)
|
||||||
|
Loading…
Reference in New Issue
Block a user