Skip to content

Commit

Permalink
Brightness (FreeBSD): fix backlight name detection
Browse files Browse the repository at this point in the history
  • Loading branch information
CarterLi committed Dec 30, 2024
1 parent 2ab2dd4 commit a378d2a
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/detection/brightness/brightness_bsd.c
Original file line number Diff line number Diff line change
Expand Up @@ -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/"));
Expand Down

0 comments on commit a378d2a

Please sign in to comment.