diff libvo/vo_xvidix.c @ 6382:86d5fc5b54e2

fix panscan support and add Jesper Svennevid's <mplayer@svennevid.net> patch
author pontscho
date Mon, 10 Jun 2002 18:40:19 +0000
parents da2dda48b7ec
children 7bd342baa785
line wrap: on
line diff
--- a/libvo/vo_xvidix.c	Mon Jun 10 16:51:41 2002 +0000
+++ b/libvo/vo_xvidix.c	Mon Jun 10 18:40:19 2002 +0000
@@ -74,7 +74,7 @@
 static uint32_t drwX, drwY, drwWidth, drwHeight, drwBorderWidth,
     drwDepth, drwcX, drwcY, dwidth, dheight;
 
-static void set_window(int force_update,const vo_tune_info_t *info, int ps)
+static void set_window(int force_update,const vo_tune_info_t *info)
 {
     Window mRoot;
     if ( WinID )
@@ -137,7 +137,7 @@
     }
 #endif
 
-    if ( ps )
+    if ( vo_panscan > 0.0f && vo_fs )
      {
       drwcX-=vo_panscan_x >> 1;
       drwcY-=vo_panscan_y >> 1;
@@ -363,12 +363,14 @@
 	vidix_grkey_set(&gr_key);
     }
 
-    set_window(1,info,0);
+    set_window(1,info);
     if(info) memcpy(&vtune,info,sizeof(vo_tune_info_t));
     else     memset(&vtune,0,sizeof(vo_tune_info_t));
     XFlush(mDisplay);
     XSync(mDisplay, False);
 
+    panscan_calc();
+
     saver_off(mDisplay); /* turning off screen saver */
     
     vo_config_count++;
@@ -386,7 +388,7 @@
     const int event = vo_x11_check_events(mDisplay);
 
     if ((event & VO_EVENT_RESIZE) || (event & VO_EVENT_EXPOSE))
-	set_window(0,&vtune,0);
+	set_window(0,&vtune);
 
     return;
 }
@@ -463,17 +465,16 @@
     return query_format(*((uint32_t*)data));
   case VOCTRL_GUISUPPORT:
     return VO_TRUE;
-  case VOCTRL_FULLSCREEN:
-    vo_x11_fullscreen();
-    return VO_TRUE;
   case VOCTRL_GET_PANSCAN:
       if ( !vo_config_count || !vo_fs ) return VO_FALSE;
       return VO_TRUE;
+  case VOCTRL_FULLSCREEN:
+      vo_x11_fullscreen();
   case VOCTRL_SET_PANSCAN:
       if ( vo_fs && ( vo_panscan != vo_panscan_amount ) )
         {
          panscan_calc();
-	 set_window( 0,&vtune,1 );
+	 set_window( 0,&vtune );
         }
       return VO_TRUE;
   }