From 69f180beeaafde560ad88084b44dd8ea30245ac0 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E6=9D=8E=E9=80=9A=E6=B4=B2?= Date: Sat, 14 Dec 2024 21:24:17 +0800 Subject: [PATCH] Display (FreeBSD): don't try to use `/sys` on FreeBSD --- src/detection/displayserver/linux/wayland/wayland.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/src/detection/displayserver/linux/wayland/wayland.c b/src/detection/displayserver/linux/wayland/wayland.c index 5e24dd39f..d19e3733c 100644 --- a/src/detection/displayserver/linux/wayland/wayland.c +++ b/src/detection/displayserver/linux/wayland/wayland.c @@ -102,7 +102,7 @@ static void waylandGlobalAddListener(void* data, struct wl_registry* registry, u } } -static bool matchDrmConnector(const char* connName, WaylandDisplay* wldata) +static FF_MAYBE_UNUSED bool matchDrmConnector(const char* connName, WaylandDisplay* wldata) { // https://wayland.freedesktop.org/docs/html/apa.html#protocol-spec-wl_output-event-name // The doc says that "do not assume that the name is a reflection of an underlying DRM connector, X11 connection, etc." @@ -148,8 +148,10 @@ void ffWaylandOutputNameListener(void* data, FF_MAYBE_UNUSED void* output, const if (display->id) return; display->type = ffdsGetDisplayType(name); + #if __linux__ if (!display->edidName.length) matchDrmConnector(name, display); + #endif display->id = ffWaylandGenerateIdFromName(name); ffStrbufAppendS(&display->name, name); }