Added initial NSScreen integration.

This (tentatively) fixes the bug of full screen windows on OS X always
opening on the primary monitor.
This commit is contained in:
Camilla Berglund
2013-04-17 23:07:44 +02:00
parent 130f07d8c3
commit 57751a5494
7 changed files with 42 additions and 15 deletions
+5 -7
View File
@@ -144,7 +144,7 @@ void _glfwInputMonitorChange(void)
}
}
_glfwDestroyMonitors();
_glfwDestroyMonitors(_glfw.monitors, _glfw.monitorCount);
_glfw.monitors = monitors;
_glfw.monitorCount = monitorCount;
@@ -175,16 +175,14 @@ void _glfwDestroyMonitor(_GLFWmonitor* monitor)
free(monitor);
}
void _glfwDestroyMonitors(void)
void _glfwDestroyMonitors(_GLFWmonitor** monitors, int count)
{
int i;
for (i = 0; i < _glfw.monitorCount; i++)
_glfwDestroyMonitor(_glfw.monitors[i]);
for (i = 0; i < count; i++)
_glfwDestroyMonitor(monitors[i]);
free(_glfw.monitors);
_glfw.monitors = NULL;
_glfw.monitorCount = 0;
free(monitors);
}
const GLFWvidmode* _glfwChooseVideoMode(_GLFWmonitor* monitor,