mirror of
https://github.com/glfw/glfw.git
synced 2026-09-18 22:55:46 +00:00
Made glfwGetPrimaryMonitor always return a handle.
Replaced the primary flag with the convention of putting the primary monitor first in the returned array.
This commit is contained in:
@@ -244,6 +244,17 @@ _GLFWmonitor** _glfwPlatformGetMonitors(int* count)
|
||||
|
||||
free(displays);
|
||||
|
||||
for (i = 0; i < monitorCount; i++)
|
||||
{
|
||||
if (CGDisplayIsMain(monitors[i]->ns.displayID))
|
||||
{
|
||||
_GLFWmonitor* temp = monitors[0];
|
||||
monitors[0] = monitors[i];
|
||||
monitors[i] = temp;
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
*count = monitorCount;
|
||||
return monitors;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user