mirror of
https://github.com/sheumann/hush.git
synced 2025-02-18 14:30:44 +00:00
fbsplash: fix regression from e4fa7b7
commit e4fa7b7 (limit progress bar flicker) made the progress bar counter unsigned causing i < 0 to never come true. Signed-off-by: Timo Teräs <timo.teras@iki.fi> Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
This commit is contained in:
parent
3aeb870b22
commit
67dc7b21ca
@ -312,8 +312,7 @@ static void fb_drawprogressbar(unsigned percent)
|
|||||||
|
|
||||||
pos_x = left_x;
|
pos_x = left_x;
|
||||||
if (percent > 0) {
|
if (percent > 0) {
|
||||||
int y;
|
int i, y;
|
||||||
unsigned i;
|
|
||||||
|
|
||||||
// actual progress bar
|
// actual progress bar
|
||||||
pos_x += (unsigned)(width * percent) / 100;
|
pos_x += (unsigned)(width * percent) / 100;
|
||||||
@ -325,7 +324,7 @@ static void fb_drawprogressbar(unsigned percent)
|
|||||||
while (i >= 0) {
|
while (i >= 0) {
|
||||||
// draw one-line thick "rectangle"
|
// draw one-line thick "rectangle"
|
||||||
// top line will have gray lvl 200, bottom one 100
|
// top line will have gray lvl 200, bottom one 100
|
||||||
unsigned gray_level = 100 + i*100 / height;
|
unsigned gray_level = 100 + (unsigned)i*100 / height;
|
||||||
fb_drawfullrectangle(
|
fb_drawfullrectangle(
|
||||||
left_x, y, pos_x, y,
|
left_x, y, pos_x, y,
|
||||||
gray_level, gray_level, gray_level);
|
gray_level, gray_level, gray_level);
|
||||||
|
Loading…
x
Reference in New Issue
Block a user