diff options
author | atlka <atlka@b3059339-0415-0410-9bf9-f77b7e298cf2> | 2001-08-28 14:22:37 +0000 |
---|---|---|
committer | atlka <atlka@b3059339-0415-0410-9bf9-f77b7e298cf2> | 2001-08-28 14:22:37 +0000 |
commit | 7e4dac5d3d4333969f0751c8171292ab2e0ef087 (patch) | |
tree | 99c3c923fd7c2ed3063930c33aaafe734c9dae63 | |
parent | 60737e38456d9a118272c47b517616c001f6b1b8 (diff) |
changes according to OSD calculations
git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@1728 b3059339-0415-0410-9bf9-f77b7e298cf2
-rw-r--r-- | libvo/sub.c | 13 | ||||
-rw-r--r-- | mplayer.c | 10 |
2 files changed, 10 insertions, 13 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; @@ -1759,11 +1759,11 @@ if(rel_seek_secs || abs_seek_pos){ // Set OSD: if(osd_level){ int len=((demuxer->movi_end-demuxer->movi_start)>>8); - if(len>0){ - osd_visible=sh_video->fps; // 1 sec - vo_osd_progbar_type=0; - vo_osd_progbar_value=(demuxer->filepos-demuxer->movi_start)/len; - } + if (len>0){ + osd_visible=sh_video->fps; // 1 sec + vo_osd_progbar_type=0; + vo_osd_progbar_value=(demuxer->filepos-demuxer->movi_start)/len; + } } #endif |