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:
Camilla Berglund
2013-02-17 19:09:22 +01:00
parent eb80266d89
commit 1961cecb7c
5 changed files with 35 additions and 33 deletions
+11
View File
@@ -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;
}