diff options
Diffstat (limited to '')
-rw-r--r-- | gui/progressbar.cpp | 12 |
1 files changed, 8 insertions, 4 deletions
diff --git a/gui/progressbar.cpp b/gui/progressbar.cpp index 83de4d13b..a4d132932 100644 --- a/gui/progressbar.cpp +++ b/gui/progressbar.cpp @@ -156,11 +156,15 @@ int GUIProgressBar::Update(void) cur -= min; min = 0; - if (cur < min) cur = min; - if (cur > max) cur = max; + if (cur < min) + cur = min; + if (cur > max) + cur = max; - if (max == 0) pos = 0; - else pos = (cur * mRenderW) / max; + if (max == 0) + pos = 0; + else + pos = (cur * mRenderW) / max; if (pos == mLastPos) return 0; |