Cocoa: Add work area NULL checks and fix size

Related to #1322.
master
Doug Binks ago%!(EXTRA string=7 years) committed by Camilla Löwy
parent bea4818030
commit 222ac78a44
  1. 12
      src/cocoa_monitor.m

@ -420,10 +420,14 @@ void _glfwPlatformGetMonitorWorkarea(_GLFWmonitor* monitor, int* xpos, int* ypos
NSRect frameRect = [[NSScreen resultScreen] visibleFrame];
*xpos = NSMinX(frameRect);
*ypos = NSMinY(frameRect);
*width = NSMaxX(frameRect);
*height = NSMaxY(frameRect);
if (xpos)
*xpos = NSMinX(frameRect);
if (ypos)
*ypos = NSMinY(frameRect);
if (width)
*width = NSWidth(frameRect);
if (height)
*height = NSHeight(frameRect);
}
GLFWvidmode* _glfwPlatformGetVideoModes(_GLFWmonitor* monitor, int* count)

Loading…
Cancel
Save