mirror of
https://github.com/glfw/glfw.git
synced 2026-09-18 22:55:46 +00:00
Made glfwGetMonitorPos immediate.
This commit is contained in:
+11
-3
@@ -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;
|
||||
|
||||
Reference in New Issue
Block a user