changeset 9692:148281a4e77b

fixing truetype rescaling with (x)mga + panscan Patch by J. Makovicka
author gabucino
date Wed, 26 Mar 2003 11:51:40 +0000
parents ed72c158215d
children 1d598bf65571
files libvo/mga_common.c
diffstat 1 files changed, 2 insertions(+), 1 deletions(-) [+]
line wrap: on
line diff
--- a/libvo/mga_common.c	Wed Mar 26 11:35:13 2003 +0000
+++ b/libvo/mga_common.c	Wed Mar 26 11:51:40 2003 +0000
@@ -27,6 +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);
     switch(mga_vid_config.format){
     case MGA_VID_FORMAT_YV12:
     case MGA_VID_FORMAT_IYUV:
@@ -44,7 +45,7 @@
 
 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);
 }