From 4b29b56029b2a1f98f2bbd4b9d775b89b4952d8a Mon Sep 17 00:00:00 2001 From: Chris Date: Tue, 28 Feb 2023 21:53:30 +1100 Subject: [PATCH] Fixes passing 0 to `--brightness` CLI parameter --- cli.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/cli.cpp b/cli.cpp index 2d4da7d0..739298da 100644 --- a/cli.cpp +++ b/cli.cpp @@ -1046,7 +1046,7 @@ void ApplyOptions(DeviceOptions& options, std::vector& rgb_cont | supports that colour mode then swich to it before | | evaluating if a colour needs to be set | \*---------------------------------------------------------*/ - if((options.brightness > 0) && (device->modes[mode].flags & MODE_FLAG_HAS_BRIGHTNESS)) + if((options.brightness >= 0) && (device->modes[mode].flags & MODE_FLAG_HAS_BRIGHTNESS)) { unsigned int new_brightness = device->modes[mode].brightness_max - device->modes[mode].brightness_min; new_brightness *= options.brightness;