1
0
Fork 0
mirror of https://github.com/gwm17/glfw.git synced 2024-11-26 20:28:49 -05:00

Cocoa: Remove errors emitted on headless systems

Related to #958.
This commit is contained in:
Camilla Löwy 2017-03-08 12:38:08 +01:00
parent 43fc399cd1
commit 6a8ade99c7

View File

@ -48,9 +48,8 @@ static char* getDisplayName(CGDirectDisplayID displayID)
IOServiceMatching("IODisplayConnect"),
&it) != 0)
{
_glfwInputError(GLFW_PLATFORM_ERROR,
"Cocoa: Failed to get display service port iterator");
return 0;
// This may happen if a desktop Mac is running headless
return NULL;
}
while ((service = IOIteratorNext(it)) != 0)
@ -99,8 +98,6 @@ static char* getDisplayName(CGDirectDisplayID displayID)
(const void**) &nameRef))
{
// This may happen if a desktop Mac is running headless
_glfwInputError(GLFW_PLATFORM_ERROR,
"Cocoa: Failed to retrieve display name");
CFRelease(info);
return NULL;
}