mirror of
https://github.com/glfw/glfw.git
synced 2026-09-23 00:59:48 +00:00
+4
-7
@@ -413,13 +413,7 @@ 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];
|
||||||
break;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
NSRect frameRect = [[NSScreen resultScreen] visibleFrame];
|
|
||||||
|
|
||||||
if (xpos)
|
if (xpos)
|
||||||
*xpos = NSMinX(frameRect);
|
*xpos = NSMinX(frameRect);
|
||||||
if (ypos)
|
if (ypos)
|
||||||
@@ -428,6 +422,9 @@ void _glfwPlatformGetMonitorWorkarea(_GLFWmonitor* monitor, int* xpos, int* ypos
|
|||||||
*width = NSWidth(frameRect);
|
*width = NSWidth(frameRect);
|
||||||
if (height)
|
if (height)
|
||||||
*height = NSHeight(frameRect);
|
*height = NSHeight(frameRect);
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
GLFWvidmode* _glfwPlatformGetVideoModes(_GLFWmonitor* monitor, int* count)
|
GLFWvidmode* _glfwPlatformGetVideoModes(_GLFWmonitor* monitor, int* count)
|
||||||
|
|||||||
Reference in New Issue
Block a user