Mercurial > mplayer.hg
changeset 1878:96ae64356ea0
corrections to OSD mark position
author | atlka |
---|---|
date | Mon, 10 Sep 2001 13:23:27 +0000 |
parents | c994e444242b |
children | e1be997afbda |
files | libvo/sub.c |
diffstat | 1 files changed, 9 insertions(+), 4 deletions(-) [+] |
line wrap: on
line diff
--- a/libvo/sub.c Sun Sep 09 19:20:59 2001 +0000 +++ b/libvo/sub.c Mon Sep 10 13:23:27 2001 +0000 @@ -34,8 +34,8 @@ // 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,8 +56,13 @@ if (vo_osd_progbar_value<=0) mark=0; - else if ((mark=(vo_osd_progbar_value*elems)>>8)>elems) - mark=elems; + else { + int ev=vo_osd_progbar_value*elems; + mark=ev>>8; + if (ev & 0xFF) mark++; + if (mark>elems) mark=elems; + } + // printf("osd.progbar width=%d xpos=%d\n",width,x);