From 6a8ade99c753be7511c866782ef4dde1ba92cedc Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Camilla=20L=C3=B6wy?= Date: Wed, 8 Mar 2017 12:38:08 +0100 Subject: [PATCH] Cocoa: Remove errors emitted on headless systems Related to #958. --- src/cocoa_monitor.m | 7 ++----- 1 file changed, 2 insertions(+), 5 deletions(-) diff --git a/src/cocoa_monitor.m b/src/cocoa_monitor.m index 3b2eccfb..41a6cff0 100644 --- a/src/cocoa_monitor.m +++ b/src/cocoa_monitor.m @@ -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; }