summaryrefslogtreecommitdiffstats
path: root/gui/progressbar.cpp
diff options
context:
space:
mode:
authorMatt Mower <mowerm@gmail.com>2014-04-16 20:43:36 +0200
committerEthan Yonker <dees_troy@teamw.in>2014-06-04 16:13:37 +0200
commitfb1c4ffaafae4843c7edb302351b7df48e02a990 (patch)
tree284a58b5a5b9d827e409bd169a06c2a146a662be /gui/progressbar.cpp
parentAdd options to repair or change file system (diff)
downloadandroid_bootable_recovery-fb1c4ffaafae4843c7edb302351b7df48e02a990.tar
android_bootable_recovery-fb1c4ffaafae4843c7edb302351b7df48e02a990.tar.gz
android_bootable_recovery-fb1c4ffaafae4843c7edb302351b7df48e02a990.tar.bz2
android_bootable_recovery-fb1c4ffaafae4843c7edb302351b7df48e02a990.tar.lz
android_bootable_recovery-fb1c4ffaafae4843c7edb302351b7df48e02a990.tar.xz
android_bootable_recovery-fb1c4ffaafae4843c7edb302351b7df48e02a990.tar.zst
android_bootable_recovery-fb1c4ffaafae4843c7edb302351b7df48e02a990.zip
Diffstat (limited to 'gui/progressbar.cpp')
-rw-r--r--gui/progressbar.cpp12
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;