Fix for _glfwPlatformGetMonitorWorkarea with NULL inputs.

This commit is contained in:
Doug Binks 2018-09-08 17:14:57 +02:00
parent 921d9833b2
commit af43c42c93

View File

@ -307,9 +307,13 @@ void _glfwPlatformGetMonitorWorkarea(_GLFWmonitor* monitor, int* xpos, int* ypos
hMonitor = MonitorFromPoint( pointInMonitor, 0 );
GetMonitorInfo(hMonitor, &monitorInfo);
if (xpos)
*xpos = monitorInfo.rcWork.left;
if (ypos)
*ypos = monitorInfo.rcWork.top;
if (width)
*width = monitorInfo.rcWork.right - monitorInfo.rcWork.left;
if (height)
*height = monitorInfo.rcWork.bottom - monitorInfo.rcWork.top;
}