summaryrefslogtreecommitdiffstats
path: root/libvo/sub.c
diff options
context:
space:
mode:
Diffstat (limited to 'libvo/sub.c')
-rw-r--r--libvo/sub.c13
1 files changed, 5 insertions, 8 deletions
diff --git a/libvo/sub.c b/libvo/sub.c
index 890b9a3820..f987e2b8ae 100644
--- a/libvo/sub.c
+++ b/libvo/sub.c
@@ -34,8 +34,8 @@ int vo_osd_progbar_value=100; // 0..256
// if we have n=256 bars then OSD progbar looks like below
//
-// 0 1 2 3 ... 256 <= vo_osd_progbar_value
-// | | | | |
+// 0 1 2 3 ... 256 <= vo_osd_progbar_value
+// | | | | |
// [ === === === ... === ]
//
// the above schema is rescalled to n=elems bars
@@ -56,12 +56,9 @@ inline static void vo_draw_text_progbar(int dxs,int dys,void (*draw_alpha)(int x
if (vo_osd_progbar_value<=0)
mark=0;
- else {
- int mm=vo_osd_progbar_value*elems;
- mark=mm>>8;
- if (mm & 0x00FF) mark++;
- if (mark>elems) mark=elems;
- }
+ else if ((mark=(vo_osd_progbar_value*elems)>>8)>elems)
+ mark=elems;
+
// printf("osd.progbar width=%d xpos=%d\n",width,x);
c=vo_osd_progbar_type;