output-xrandr: Don't treat 0 as invalid backlight value

Whether a value is in range depends on the backlight-min/max values,
and I didn't spot anything that excludes 0 as a valid lower limit
outright.

Part-of: <https://gitlab.gnome.org/GNOME/mutter/-/merge_requests/2947>
This commit is contained in:
Florian Müllner 2023-04-03 20:38:21 +02:00 committed by Marge Bot
parent aa1eaa8120
commit 018786dab8

View File

@ -529,7 +529,7 @@ output_get_backlight_xrandr (MetaOutput *output)
return -1;
value = ((int*)buffer)[0];
if (value > 0)
if (value >= 0)
return normalize_backlight (output, value);
else
return -1;