Fixes passing 0 to --brightness CLI parameter
This commit is contained in:
parent
c1e745fa4d
commit
4b29b56029
1 changed files with 1 additions and 1 deletions
2
cli.cpp
2
cli.cpp
|
|
@ -1046,7 +1046,7 @@ void ApplyOptions(DeviceOptions& options, std::vector<RGBController *>& 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;
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue