Made glfwGetMonitorPos immediate.

This commit is contained in:
Camilla Berglund
2013-02-20 16:00:53 +01:00
parent a591cdeba6
commit 7b3783abe2
7 changed files with 76 additions and 45 deletions
+11 -3
View File
@@ -231,11 +231,9 @@ _GLFWmonitor** _glfwPlatformGetMonitors(int* count)
for (i = 0; i < monitorCount; i++)
{
const CGSize size = CGDisplayScreenSize(displays[i]);
const CGRect bounds = CGDisplayBounds(displays[i]);
monitors[found] = _glfwCreateMonitor(getDisplayName(displays[i]),
size.width, size.height,
bounds.origin.x, bounds.origin.y);
size.width, size.height);
monitors[found]->ns.displayID = displays[i];
found++;
@@ -258,6 +256,16 @@ _GLFWmonitor** _glfwPlatformGetMonitors(int* count)
return monitors;
}
void _glfwPlatformGetMonitorPos(_GLFWmonitor* monitor, int* xpos, int* ypos)
{
const CGRect bounds = CGDisplayBounds(monitor->ns.displayID);
if (xpos)
*xpos = (int) bounds.origin.x;
if (ypos)
*ypos = (int) bounds.origin.y;
}
GLFWvidmode* _glfwPlatformGetVideoModes(_GLFWmonitor* monitor, int* found)
{
CFArrayRef modes;