|
|
@ -268,7 +268,8 @@ _GLFWmonitor** _glfwPlatformGetMonitors(int* count) |
|
|
|
char* name = getDisplayName(displays[i]); |
|
|
|
char* name = getDisplayName(displays[i]); |
|
|
|
|
|
|
|
|
|
|
|
monitor = _glfwAllocMonitor(name, size.width, size.height); |
|
|
|
monitor = _glfwAllocMonitor(name, size.width, size.height); |
|
|
|
monitor->ns.displayID = displays[i]; |
|
|
|
monitor->ns.displayID = displays[i]; |
|
|
|
|
|
|
|
monitor->ns.unitNumber = CGDisplayUnitNumber(displays[i]); |
|
|
|
|
|
|
|
|
|
|
|
free(name); |
|
|
|
free(name); |
|
|
|
|
|
|
|
|
|
|
@ -284,7 +285,9 @@ _GLFWmonitor** _glfwPlatformGetMonitors(int* count) |
|
|
|
|
|
|
|
|
|
|
|
GLboolean _glfwPlatformIsSameMonitor(_GLFWmonitor* first, _GLFWmonitor* second) |
|
|
|
GLboolean _glfwPlatformIsSameMonitor(_GLFWmonitor* first, _GLFWmonitor* second) |
|
|
|
{ |
|
|
|
{ |
|
|
|
return first->ns.displayID == second->ns.displayID; |
|
|
|
// HACK: Compare unit numbers instead of display IDs to work around display |
|
|
|
|
|
|
|
// replacement on machines with automatic graphics switching |
|
|
|
|
|
|
|
return first->ns.unitNumber == second->ns.unitNumber; |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
void _glfwPlatformGetMonitorPos(_GLFWmonitor* monitor, int* xpos, int* ypos) |
|
|
|
void _glfwPlatformGetMonitorPos(_GLFWmonitor* monitor, int* xpos, int* ypos) |
|
|
|