mirror of
https://github.com/hyperion-project/hyperion.ng.git
synced 2025-03-01 10:33:28 +00:00
fix cast
This commit is contained in:
parent
0676f441f1
commit
4e77d4a0d4
@ -183,14 +183,14 @@ void RgbTransform::applyBacklight(uint8_t & red, uint8_t & green, uint8_t & blue
|
|||||||
rgbSum = red+green+blue;
|
rgbSum = red+green+blue;
|
||||||
}
|
}
|
||||||
|
|
||||||
uint8_t cLow = static_cast<uint8_t>(qMin(static_cast<int>(_sumBrightnessLow / rgbSum), UINT8_MAX));
|
uint8_t cLow = static_cast<uint8_t>(qMin(static_cast<double>(_sumBrightnessLow/rgbSum), static_cast<double>(UINT8_MAX)));
|
||||||
red *= cLow;
|
red *= cLow;
|
||||||
green *= cLow;
|
green *= cLow;
|
||||||
blue *= cLow;
|
blue *= cLow;
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
red = static_cast<uint8_t>(qMin(static_cast<int>(_sumBrightnessLow/3.0), UINT8_MAX));
|
red = static_cast<uint8_t>(qMin(static_cast<double>(_sumBrightnessLow/3.0), static_cast<double>(UINT8_MAX)));
|
||||||
green = red;
|
green = red;
|
||||||
blue = red;
|
blue = red;
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user