[Mplayer-cvslog] CVS: main/libvo sub.c,1.30,1.31

Adam Tla/lka atlka at mplayer.dev.hu
Mon Sep 10 15:23:43 CEST 2001


Update of /cvsroot/mplayer/main/libvo
In directory mplayer:/var/tmp.root/cvs-serv6575/libvo

Modified Files:
	sub.c 
Log Message:
corrections to OSD mark position


Index: sub.c
===================================================================
RCS file: /cvsroot/mplayer/main/libvo/sub.c,v
retrieving revision 1.30
retrieving revision 1.31
diff -u -r1.30 -r1.31
--- sub.c	4 Sep 2001 15:21:00 -0000	1.30
+++ sub.c	10 Sep 2001 13:23:27 -0000	1.31
@@ -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);
 




More information about the MPlayer-cvslog mailing list