comparison libvo/vo_xvmc.c @ 15212:05aa13cdf92f

replace VO and VF numeric flags with #defined identifiers
author henry
date Mon, 18 Apr 2005 15:52:38 +0000
parents d42f22a1503b
children 91d210e8a19c
comparison
equal deleted inserted replaced
15211:d42f22a1503b 15212:05aa13cdf92f
600 vo_dx=( vo_screenwidth - d_width ) / 2; vo_dy=( vo_screenheight - d_height ) / 2; 600 vo_dx=( vo_screenwidth - d_width ) / 2; vo_dy=( vo_screenheight - d_height ) / 2;
601 geometry(&vo_dx, &vo_dy, &d_width, &d_height, vo_screenwidth, vo_screenheight); 601 geometry(&vo_dx, &vo_dy, &d_width, &d_height, vo_screenwidth, vo_screenheight);
602 vo_dwidth=d_width; vo_dheight=d_height; 602 vo_dwidth=d_width; vo_dheight=d_height;
603 603
604 #ifdef HAVE_XF86VM 604 #ifdef HAVE_XF86VM
605 if( flags&0x02 ) vm = 1; 605 if( flags&VOFLAG_MODESWITCHING ) vm = 1;
606 #endif 606 #endif
607 607
608 aspect_save_screenres(vo_screenwidth,vo_screenheight); 608 aspect_save_screenres(vo_screenwidth,vo_screenheight);
609 609
610 #ifdef HAVE_NEW_GUI 610 #ifdef HAVE_NEW_GUI
684 ((WinID==0) ? 0 : (PointerMotionMask 684 ((WinID==0) ? 0 : (PointerMotionMask
685 | ButtonPressMask | ButtonReleaseMask)) ); 685 | ButtonPressMask | ButtonReleaseMask)) );
686 XSetStandardProperties(mDisplay, vo_window, hello, hello, None, NULL, 0, &hint); 686 XSetStandardProperties(mDisplay, vo_window, hello, hello, None, NULL, 0, &hint);
687 XSetWMNormalHints( mDisplay,vo_window,&hint ); 687 XSetWMNormalHints( mDisplay,vo_window,&hint );
688 XMapWindow(mDisplay, vo_window); 688 XMapWindow(mDisplay, vo_window);
689 if ( flags&1 ) vo_x11_fullscreen(); 689 if ( flags&VOFLAG_FULLSCREEN ) vo_x11_fullscreen();
690 else { 690 else {
691 #ifdef HAVE_XINERAMA 691 #ifdef HAVE_XINERAMA
692 vo_x11_xinerama_move(mDisplay,vo_window); 692 vo_x11_xinerama_move(mDisplay,vo_window);
693 #endif 693 #endif
694 vo_x11_sizehint( hint.x, hint.y, hint.width, hint.height,0 ); 694 vo_x11_sizehint( hint.x, hint.y, hint.width, hint.height,0 );
695 } 695 }
696 } else { 696 } else {
697 // vo_fs set means we were already at fullscreen 697 // vo_fs set means we were already at fullscreen
698 vo_x11_sizehint( hint.x, hint.y, hint.width, hint.height,0 ); 698 vo_x11_sizehint( hint.x, hint.y, hint.width, hint.height,0 );
699 if ( !vo_fs ) XMoveResizeWindow( mDisplay,vo_window,hint.x,hint.y,hint.width,hint.height ); 699 if ( !vo_fs ) XMoveResizeWindow( mDisplay,vo_window,hint.x,hint.y,hint.width,hint.height );
700 if ( flags&1 && !vo_fs ) vo_x11_fullscreen(); // handle -fs on non-first file 700 if ( flags&VOFLAG_FULLSCREEN && !vo_fs ) vo_x11_fullscreen(); // handle -fs on non-first file
701 } 701 }
702 702
703 // vo_x11_sizehint( hint.x, hint.y, hint.width, hint.height,0 ); 703 // vo_x11_sizehint( hint.x, hint.y, hint.width, hint.height,0 );
704 704
705 if ( vo_gc != None ) XFreeGC( mDisplay,vo_gc ); 705 if ( vo_gc != None ) XFreeGC( mDisplay,vo_gc );
717 } 717 }
718 #endif 718 #endif
719 } 719 }
720 720
721 aspect(&vo_dwidth,&vo_dheight,A_NOZOOM); 721 aspect(&vo_dwidth,&vo_dheight,A_NOZOOM);
722 if ( (( flags&1 )&&( WinID <= 0 )) || vo_fs ) 722 if ( (( flags&VOFLAG_FULLSCREEN )&&( WinID <= 0 )) || vo_fs )
723 { 723 {
724 aspect(&vo_dwidth,&vo_dheight,A_ZOOM); 724 aspect(&vo_dwidth,&vo_dheight,A_ZOOM);
725 drwX=( vo_screenwidth - (vo_dwidth > vo_screenwidth?vo_screenwidth:vo_dwidth) ) / 2; 725 drwX=( vo_screenwidth - (vo_dwidth > vo_screenwidth?vo_screenwidth:vo_dwidth) ) / 2;
726 drwY=( vo_screenheight - (vo_dheight > vo_screenheight?vo_screenheight:vo_dheight) ) / 2; 726 drwY=( vo_screenheight - (vo_dheight > vo_screenheight?vo_screenheight:vo_dheight) ) / 2;
727 vo_dwidth=(vo_dwidth > vo_screenwidth?vo_screenwidth:vo_dwidth); 727 vo_dwidth=(vo_dwidth > vo_screenwidth?vo_screenwidth:vo_dwidth);