diff options
author | arpi <arpi@b3059339-0415-0410-9bf9-f77b7e298cf2> | 2002-11-01 00:21:45 +0000 |
---|---|---|
committer | arpi <arpi@b3059339-0415-0410-9bf9-f77b7e298cf2> | 2002-11-01 00:21:45 +0000 |
commit | 0cc738f9367639f66036e40f857174d4fd4da354 (patch) | |
tree | 639ebcd0a0efd53b8a885eb5dc4ed1c9d75cab81 /libvo/vo_xmga.c | |
parent | da59776e2d113bb19aa9e7b82facd0be9da4e700 (diff) | |
download | mpv-0cc738f9367639f66036e40f857174d4fd4da354.tar.bz2 mpv-0cc738f9367639f66036e40f857174d4fd4da354.tar.xz |
panscan support in -vo mga (actually moved common code to mga_common.c)
Ivan Szanto <szivan@duticai.TWI.TUDelft.NL>
git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@8018 b3059339-0415-0410-9bf9-f77b7e298cf2
Diffstat (limited to 'libvo/vo_xmga.c')
-rw-r--r-- | libvo/vo_xmga.c | 77 |
1 files changed, 0 insertions, 77 deletions
diff --git a/libvo/vo_xmga.c b/libvo/vo_xmga.c index d3a157e24e..7b8c7f28bb 100644 --- a/libvo/vo_xmga.c +++ b/libvo/vo_xmga.c @@ -13,7 +13,6 @@ #include <string.h> #include "config.h" -#include "mp_msg.h" #include "video_out.h" #include "video_out_internal.h" @@ -67,8 +66,6 @@ static uint32_t mvHeight; static uint32_t mvWidth; static Window mRoot; -static uint32_t drwX,drwY,drwWidth,drwHeight,drwBorderWidth,drwDepth; -static uint32_t drwcX,drwcY,dwidth,dheight; static XSetWindowAttributes xWAttribs; @@ -87,80 +84,6 @@ static void mDrawColorKey( void ) XFlush( mDisplay ); } -static void set_window( void ){ - - if ( WinID ) - { - XGetGeometry( mDisplay,vo_window,&mRoot,&drwX,&drwY,&drwWidth,&drwHeight,&drwBorderWidth,&drwDepth ); - mp_msg(MSGT_VO,MSGL_V,"[xmga] x: %d y: %d w: %d h: %d\n",drwX,drwY,drwWidth,drwHeight ); - drwX=0; drwY=0; - XTranslateCoordinates( mDisplay,vo_window,mRoot,0,0,&drwcX,&drwcY,&mRoot ); - mp_msg(MSGT_VO,MSGL_V,"[xmga] dcx: %d dcy: %d dx: %d dy: %d dw: %d dh: %d\n",drwcX,drwcY,drwX,drwY,drwWidth,drwHeight ); - } - else { drwX=drwcX=vo_dx; drwY=drwcY=vo_dy; drwWidth=vo_dwidth; drwHeight=vo_dheight; } - - aspect(&dwidth,&dheight,A_NOZOOM); - if ( vo_fs ) - { - aspect(&dwidth,&dheight,A_ZOOM); - drwX=( vo_screenwidth - (dwidth > vo_screenwidth?vo_screenwidth:dwidth) ) / 2; - drwcX+=drwX; - drwY=( vo_screenheight - (dheight > vo_screenheight?vo_screenheight:dheight) ) / 2; - drwcY+=drwY; - drwWidth=(dwidth > vo_screenwidth?vo_screenwidth:dwidth); - drwHeight=(dheight > vo_screenheight?vo_screenheight:dheight); - mp_msg(MSGT_VO,MSGL_V,"[xmga-fs] dcx: %d dcy: %d dx: %d dy: %d dw: %d dh: %d\n",drwcX,drwcY,drwX,drwY,drwWidth,drwHeight ); - } - vo_dwidth=drwWidth; vo_dheight=drwHeight; - -#ifdef HAVE_XINERAMA - if(XineramaIsActive(mDisplay)) - { - XineramaScreenInfo *screens; - int num_screens; - int i; - - screens = XineramaQueryScreens(mDisplay,&num_screens); - - /* find the screen we are on */ - i = 0; - while(!(screens[i].x_org <= drwcX && screens[i].y_org <= drwcY && - screens[i].x_org + screens[i].width >= drwcX && - screens[i].y_org + screens[i].height >= drwcY )) - { - i++; - } - - /* set drwcX and drwcY to the right values */ - drwcX = drwcX - screens[i].x_org; - drwcY = drwcY - screens[i].y_org; - XFree(screens); - } - -#endif - - mDrawColorKey(); - - mga_vid_config.x_org=drwcX; - mga_vid_config.y_org=drwcY; - mga_vid_config.dest_width=drwWidth; - mga_vid_config.dest_height=drwHeight; - if ( vo_panscan > 0.0f && vo_fs ) - { - drwX-=vo_panscan_x>>1; - drwY-=vo_panscan_y>>1; - drwWidth+=vo_panscan_x; - drwHeight+=vo_panscan_y; - - mga_vid_config.x_org-=vo_panscan_x>>1; - mga_vid_config.y_org-=vo_panscan_y>>1; - mga_vid_config.dest_width=drwWidth; - mga_vid_config.dest_height=drwHeight; - mDrawColorKey(); - if ( ioctl( f,MGA_VID_CONFIG,&mga_vid_config ) ) mp_msg(MSGT_VO,MSGL_WARN,"Error in mga_vid_config ioctl (wrong mga_vid.o version?)" ); - } -} - static void check_events(void) { int e=vo_x11_check_events(mDisplay); |