mirror of
https://github.com/glfw/glfw.git
synced 2025-10-04 13:46:37 +00:00
Fix for _glfwPlatformGetMonitorWorkarea with NULL inputs.
This commit is contained in:
parent
921d9833b2
commit
af43c42c93
@ -307,10 +307,14 @@ void _glfwPlatformGetMonitorWorkarea(_GLFWmonitor* monitor, int* xpos, int* ypos
|
||||
hMonitor = MonitorFromPoint( pointInMonitor, 0 );
|
||||
GetMonitorInfo(hMonitor, &monitorInfo);
|
||||
|
||||
*xpos = monitorInfo.rcWork.left;
|
||||
*ypos = monitorInfo.rcWork.top;
|
||||
*width = monitorInfo.rcWork.right - monitorInfo.rcWork.left;
|
||||
*height = monitorInfo.rcWork.bottom - monitorInfo.rcWork.top;
|
||||
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;
|
||||
}
|
||||
|
||||
GLFWvidmode* _glfwPlatformGetVideoModes(_GLFWmonitor* monitor, int* count)
|
||||
|
Loading…
Reference in New Issue
Block a user