From 955fbd9d265fa95adf9cb94896eb9a516aa50420 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Camilla=20L=C3=B6wy?= Date: Fri, 18 Mar 2022 00:31:34 +0100 Subject: [PATCH] Cocoa: Fix AirPlay causing harmless init error Emitting an error for one specific type of failure in retrieving the correct name for a display is not very useful, especially when initialization is otherwise unaffected. There should be a path for information like that but this isn't it. Fixes #1791 --- CONTRIBUTORS.md | 1 + README.md | 1 + src/cocoa_monitor.m | 4 ---- 3 files changed, 2 insertions(+), 4 deletions(-) diff --git a/CONTRIBUTORS.md b/CONTRIBUTORS.md index 4011336f..cc77ff13 100644 --- a/CONTRIBUTORS.md +++ b/CONTRIBUTORS.md @@ -89,6 +89,7 @@ video tutorials. - InKryption - IntellectualKitty - Aaron Jacobs + - JannikGM - Erik S. V. Jansson - jjYBdx4IL - Toni Jovanoski diff --git a/README.md b/README.md index d2499596..13e3e087 100644 --- a/README.md +++ b/README.md @@ -245,6 +245,7 @@ information on what to include when reporting a bug. a fraction of a second (#1962) - [Cocoa] Bugfix: `kIOMasterPortDefault` was deprecated in macOS 12.0 (#1980) - [Cocoa] Bugfix: `kUTTypeURL` was deprecated in macOS 12.0 (#2003) + - [Cocoa] Bugfix: A connected Apple AirPlay would emit a useless error (#1791) - [X11] Bugfix: The CMake files did not check for the XInput headers (#1480) - [X11] Bugfix: Key names were not updated when the keyboard layout changed (#1462,#1528) diff --git a/src/cocoa_monitor.m b/src/cocoa_monitor.m index 70c75aa3..64d9eb2c 100644 --- a/src/cocoa_monitor.m +++ b/src/cocoa_monitor.m @@ -98,11 +98,7 @@ static char* getMonitorName(CGDirectDisplayID displayID, NSScreen* screen) IOObjectRelease(it); if (!service) - { - _glfwInputError(GLFW_PLATFORM_ERROR, - "Cocoa: Failed to find service port for display"); return _glfw_strdup("Display"); - } CFDictionaryRef names = CFDictionaryGetValue(info, CFSTR(kDisplayProductName));