changeset 9994:275766100443

fix panscan font resizing with vo_mga
author rfelker
date Sat, 26 Apr 2003 16:56:21 +0000
parents 6e7f3643bee6
children 62d643bc53e2
files libvo/mga_common.c libvo/vo_mga.c
diffstat 2 files changed, 4 insertions(+), 3 deletions(-) [+]
line wrap: on
line diff
--- a/libvo/mga_common.c	Sat Apr 26 16:47:25 2003 +0000
+++ b/libvo/mga_common.c	Sat Apr 26 16:56:21 2003 +0000
@@ -27,7 +27,7 @@
 
 static void draw_alpha(int x0,int y0, int w,int h, unsigned char* src, unsigned char *srca, int stride){
     uint32_t bespitch = (mga_vid_config.src_width + 31) & ~31;
-//    x0+=mga_vid_config.src_width*(vo_panscan_x>>1)/(vo_dwidth+vo_panscan_x);
+    x0+=mga_vid_config.src_width*(vo_panscan_x>>1)/(vo_dwidth+vo_panscan_x);
     switch(mga_vid_config.format){
     case MGA_VID_FORMAT_YV12:
     case MGA_VID_FORMAT_IYUV:
@@ -45,8 +45,8 @@
 
 static void draw_osd(void)
 {
-    vo_draw_text(mga_vid_config.src_width,mga_vid_config.src_height,draw_alpha);
-//    vo_draw_text(mga_vid_config.src_width-mga_vid_config.src_width*vo_panscan_x/(vo_dwidth+vo_panscan_x),mga_vid_config.src_height,draw_alpha);
+//    vo_draw_text(mga_vid_config.src_width,mga_vid_config.src_height,draw_alpha);
+    vo_draw_text(mga_vid_config.src_width-mga_vid_config.src_width*vo_panscan_x/(vo_dwidth+vo_panscan_x),mga_vid_config.src_height,draw_alpha);
 }
 
 
--- a/libvo/vo_mga.c	Sat Apr 26 16:47:25 2003 +0000
+++ b/libvo/vo_mga.c	Sat Apr 26 16:56:21 2003 +0000
@@ -70,6 +70,7 @@
 		printf("vo_mga aspect(): resized to %dx%d\n",d_width,d_height);
 	}
 
+	vo_dwidth=d_width; vo_dheight=d_height;
 	mga_vid_config.dest_width = d_width;
 	mga_vid_config.dest_height= d_height;
 	mga_vid_config.x_org= 0; // (720-mga_vid_config.dest_width)/2;