summaryrefslogtreecommitdiffstats
path: root/libvo/sub.c
diff options
context:
space:
mode:
authoratlka <atlka@b3059339-0415-0410-9bf9-f77b7e298cf2>2001-08-16 11:36:13 +0000
committeratlka <atlka@b3059339-0415-0410-9bf9-f77b7e298cf2>2001-08-16 11:36:13 +0000
commit01f3a2a3a42141257c52dfebdf5ef0e4a29c62f0 (patch)
tree61c346e8f6c3c75ce428810cdc2e03c6fdfd17fe /libvo/sub.c
parentaad3a2ec861cb1e877608dc41521adf88202e6cc (diff)
downloadmpv-01f3a2a3a42141257c52dfebdf5ef0e4a29c62f0.tar.bz2
mpv-01f3a2a3a42141257c52dfebdf5ef0e4a29c62f0.tar.xz
minor changes in sub.c
git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@1550 b3059339-0415-0410-9bf9-f77b7e298cf2
Diffstat (limited to 'libvo/sub.c')
-rw-r--r--libvo/sub.c12
1 files changed, 5 insertions, 7 deletions
diff --git a/libvo/sub.c b/libvo/sub.c
index 51298928f4..52035bd9bc 100644
--- a/libvo/sub.c
+++ b/libvo/sub.c
@@ -16,8 +16,7 @@ inline static void vo_draw_text_osd(int dxs,int dys,void (*draw_alpha)(int x0,in
int x=20;
while (*cp){
- c=*cp;
- cp++;
+ c=*cp++;
if ((font=vo_font->font[c])>=0)
draw_alpha(x,y,
vo_font->width[c],
@@ -36,16 +35,15 @@ int vo_osd_progbar_value=100; // 0..255
inline static void vo_draw_text_progbar(int dxs,int dys,void (*draw_alpha)(int x0,int y0, int w,int h, unsigned char* src, unsigned char *srca, int stride)){
int i;
int y=(dys-vo_font->height)/2;
- int x;
int c,font;
- int charw=vo_font->width[OSD_PB_0]+vo_font->charspace;
int delimw=vo_font->width[OSD_PB_START]
- +vo_font->width[OSD_PB_END]
- +vo_font->charspace;
+ +vo_font->width[OSD_PB_END]
+ +vo_font->charspace;
int width=(2*dxs-3*delimw)/3;
+ int charw=vo_font->width[OSD_PB_0]+vo_font->charspace;
int elems=width/charw;
+ int x=(dxs-elems*charw-delimw)/2;
int mark=(vo_osd_progbar_value*(elems+1))>>8;
- x=(dxs-elems*charw-delimw)/2;
// printf("osd.progbar width=%d xpos=%d\n",width,x);