neutrino: avoid float for percent calculations

This commit is contained in:
Stefan Seyfried
2011-12-25 23:19:54 +01:00
parent 37c5f7c7d3
commit fb6633b7aa
5 changed files with 10 additions and 10 deletions

View File

@@ -80,7 +80,7 @@ void CProgressWindow::showGlobalStatus(const unsigned int prog)
if (global_progress > 100)
global_progress = 100;
pos += int( float(width-20)/100.0 * global_progress);
pos += (width - 20) * global_progress / 100;
//vordergrund
frameBuffer->paintBox(x+10, globalstatusY,pos, globalstatusY+10, COL_MENUCONTENT_PLUS_7);
}
@@ -106,7 +106,7 @@ void CProgressWindow::showLocalStatus(const unsigned int prog)
if (local_progress > 100)
local_progress = 100;
pos += int( float(width-20)/100.0 * local_progress);
pos += (width - 20) * local_progress / 100;
//vordergrund
frameBuffer->paintBox(x+10, localstatusY,pos, localstatusY+10, COL_MENUCONTENT_PLUS_7);
}