Mercurial > mplayer.hg
comparison libvo/vo_x11.c @ 4677:305a0c20bde4
default is allways nozoom again (specify -zoom if u want the sane behavior)
call freeSwsContext() on uninit()
author | michael |
---|---|
date | Tue, 12 Feb 2002 17:55:03 +0000 |
parents | 90cf53f47ab7 |
children | b4f72d6b2365 |
comparison
equal
deleted
inserted
replaced
4676:f6a2d81c52ac | 4677:305a0c20bde4 |
---|---|
264 | 264 |
265 if( flags&0x03 ) fullscreen = 1; | 265 if( flags&0x03 ) fullscreen = 1; |
266 if( flags&0x02 ) vm = 1; | 266 if( flags&0x02 ) vm = 1; |
267 if( flags&0x08 ) Flip_Flag = 1; | 267 if( flags&0x08 ) Flip_Flag = 1; |
268 zoomFlag = flags&0x04; | 268 zoomFlag = flags&0x04; |
269 if(!fullscreen) zoomFlag=1; //it makes no sense to avoid zooming on windowd mode | 269 // if(!fullscreen) zoomFlag=1; //it makes no sense to avoid zooming on windowd mode |
270 | 270 |
271 //printf( "w: %d h: %d\n\n",vo_dwidth,vo_dheight ); | 271 //printf( "w: %d h: %d\n\n",vo_dwidth,vo_dheight ); |
272 | 272 |
273 XGetWindowAttributes( mDisplay,DefaultRootWindow( mDisplay ),&attribs ); | 273 XGetWindowAttributes( mDisplay,DefaultRootWindow( mDisplay ),&attribs ); |
274 depth=attribs.depth; | 274 depth=attribs.depth; |
276 if ( depth != 15 && depth != 16 && depth != 24 && depth != 32 ) depth=24; | 276 if ( depth != 15 && depth != 16 && depth != 24 && depth != 32 ) depth=24; |
277 XMatchVisualInfo( mDisplay,mScreen,depth,TrueColor,&vinfo ); | 277 XMatchVisualInfo( mDisplay,mScreen,depth,TrueColor,&vinfo ); |
278 | 278 |
279 /* set image size, if zoom is on it will be changed during draw_slice anyway | 279 /* set image size, if zoom is on it will be changed during draw_slice anyway |
280 so we dont dupplicate the aspect code here */ | 280 so we dont dupplicate the aspect code here */ |
281 image_width=d_width; | 281 image_width=width; |
282 image_height=d_height; | 282 image_height=height; |
283 | 283 |
284 aspect= ((1<<16)*d_width + d_height/2)/d_height; | 284 aspect= ((1<<16)*d_width + d_height/2)/d_height; |
285 | 285 |
286 #ifdef HAVE_NEW_GUI | 286 #ifdef HAVE_NEW_GUI |
287 if ( vo_window != None ) { mywindow=vo_window; mygc=vo_gc; } | 287 if ( vo_window != None ) { mywindow=vo_window; mygc=vo_gc; } |
563 #ifdef HAVE_XF86VM | 563 #ifdef HAVE_XF86VM |
564 vo_vm_close(mDisplay); | 564 vo_vm_close(mDisplay); |
565 #endif | 565 #endif |
566 | 566 |
567 vo_x11_uninit(mDisplay, mywindow); | 567 vo_x11_uninit(mDisplay, mywindow); |
568 | |
569 freeSwsContext(swsContext); | |
568 } | 570 } |
569 | 571 |
570 static uint32_t preinit(const char *arg) | 572 static uint32_t preinit(const char *arg) |
571 { | 573 { |
572 return 0; | 574 return 0; |