mirror of
https://github.com/tuxbox-neutrino/neutrino.git
synced 2025-08-28 07:51:19 +02:00
neutrino: avoid float for percent calculations
This commit is contained in:
@@ -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);
|
||||
}
|
||||
|
Reference in New Issue
Block a user