mirror of
https://github.com/glfw/glfw.git
synced 2026-09-21 16:44:11 +00:00
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:
+5
-7
@@ -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,
|
||||
|
||||
Reference in New Issue
Block a user