summaryrefslogtreecommitdiffstats
path: root/libvo/sub.c
diff options
context:
space:
mode:
authoratlka <atlka@b3059339-0415-0410-9bf9-f77b7e298cf2>2001-08-28 14:22:37 +0000
committeratlka <atlka@b3059339-0415-0410-9bf9-f77b7e298cf2>2001-08-28 14:22:37 +0000
commit7e4dac5d3d4333969f0751c8171292ab2e0ef087 (patch)
tree99c3c923fd7c2ed3063930c33aaafe734c9dae63 /libvo/sub.c
parent60737e38456d9a118272c47b517616c001f6b1b8 (diff)
downloadmpv-7e4dac5d3d4333969f0751c8171292ab2e0ef087.tar.bz2
mpv-7e4dac5d3d4333969f0751c8171292ab2e0ef087.tar.xz
changes according to OSD calculations
git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@1728 b3059339-0415-0410-9bf9-f77b7e298cf2
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;