From a378d2ad6234e23dad903bea6e287c005a376e09 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E6=9D=8E=E9=80=9A=E6=B4=B2?= Date: Mon, 30 Dec 2024 11:12:06 +0800 Subject: [PATCH] Brightness (FreeBSD): fix backlight name detection --- src/detection/brightness/brightness_bsd.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/detection/brightness/brightness_bsd.c b/src/detection/brightness/brightness_bsd.c index b71f1074f..c77c378fe 100644 --- a/src/detection/brightness/brightness_bsd.c +++ b/src/detection/brightness/brightness_bsd.c @@ -34,7 +34,7 @@ const char* ffDetectBrightness(FF_MAYBE_UNUSED FFBrightnessOptions* options, FFl brightness->current = status.brightness; struct backlight_info info; - if(ioctl(blfd, BACKLIGHTGETINFO, &info) < 0) + if(ioctl(blfd, BACKLIGHTGETINFO, &info) == 0) ffStrbufAppendS(&brightness->name, info.name); else ffStrbufAppendS(&brightness->name, path + strlen("/dev/backlight/"));