mirror of
https://github.com/glfw/glfw.git
synced 2024-11-22 13:04:35 +00:00
parent
ba4e78e57f
commit
68fd4e8bb3
@ -413,21 +413,18 @@ void _glfwPlatformGetMonitorWorkarea(_GLFWmonitor* monitor, int* xpos, int* ypos
|
|||||||
NSScreen *resultScreen;
|
NSScreen *resultScreen;
|
||||||
for (NSScreen *screen in [NSScreen screens]) {
|
for (NSScreen *screen in [NSScreen screens]) {
|
||||||
if ([[[screen deviceDescription] valueForKey:@"NSScreenNumber"] intValue] == monitor->ns.displayID) {
|
if ([[[screen deviceDescription] valueForKey:@"NSScreenNumber"] intValue] == monitor->ns.displayID) {
|
||||||
resultScreen = screen;
|
NSRect frameRect = [screen visibleFrame];
|
||||||
|
if (xpos)
|
||||||
|
*xpos = NSMinX(frameRect);
|
||||||
|
if (ypos)
|
||||||
|
*ypos = NSMinY(frameRect);
|
||||||
|
if (width)
|
||||||
|
*width = NSWidth(frameRect);
|
||||||
|
if (height)
|
||||||
|
*height = NSHeight(frameRect);
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
NSRect frameRect = [[NSScreen resultScreen] visibleFrame];
|
|
||||||
|
|
||||||
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)
|
GLFWvidmode* _glfwPlatformGetVideoModes(_GLFWmonitor* monitor, int* count)
|
||||||
|
Loading…
Reference in New Issue
Block a user