Mercurial > mplayer.hg
comparison libvo/vo_x11.c @ 4815:178b524e5213
Bugfix in x11_common.c mainly. Don't screw up the display name,
don't forget to close the display (vo_xv) and to reset vo_depthonscreen
when we have destroyed the window and closed the display !!!!!
Open the display before using it (vo_x11) !!!
author | albeu |
---|---|
date | Sat, 23 Feb 2002 01:38:06 +0000 |
parents | 15e95b9cf191 |
children | 8570abfc6feb |
comparison
equal
deleted
inserted
replaced
4814:23abc0e262e3 | 4815:178b524e5213 |
---|---|
241 unsigned int modeline_width, modeline_height; | 241 unsigned int modeline_width, modeline_height; |
242 static uint32_t vm_width; | 242 static uint32_t vm_width; |
243 static uint32_t vm_height; | 243 static uint32_t vm_height; |
244 #endif | 244 #endif |
245 | 245 |
246 #ifdef HAVE_NEW_GUI | |
247 if ( vo_window == None ) | |
248 #endif | |
249 if( !vo_init() ) return 0; // Can't open X11 | |
250 | |
251 | |
246 if (!title) | 252 if (!title) |
247 title = strdup("MPlayer X11 (XImage/Shm) render"); | 253 title = strdup("MPlayer X11 (XImage/Shm) render"); |
248 | 254 |
249 in_format=format; | 255 in_format=format; |
250 srcW= width; | 256 srcW= width; |
274 | 280 |
275 #ifdef HAVE_NEW_GUI | 281 #ifdef HAVE_NEW_GUI |
276 if ( vo_window == None ) | 282 if ( vo_window == None ) |
277 #endif | 283 #endif |
278 { | 284 { |
279 if( !vo_init() ) return 0; // Can't open X11 | |
280 | |
281 hint.x=0; | 285 hint.x=0; |
282 hint.y=0; | 286 hint.y=0; |
283 if(zoomFlag){ | 287 if(zoomFlag){ |
284 hint.width=d_width; | 288 hint.width=d_width; |
285 hint.height=d_height; | 289 hint.height=d_height; |
522 return draw_slice(src, stride, srcW, srcH, 0, 0); | 526 return draw_slice(src, stride, srcW, srcH, 0, 0); |
523 } | 527 } |
524 | 528 |
525 static uint32_t query_format( uint32_t format ) | 529 static uint32_t query_format( uint32_t format ) |
526 { | 530 { |
527 if( !vo_init() ) return 0; // Can't open X11 | 531 //if( !vo_init() ) return 0; // Can't open X11 |
528 | 532 |
529 switch( format ) | 533 switch( format ) |
530 { | 534 { |
531 case IMGFMT_BGR15: | 535 case IMGFMT_BGR15: |
532 case IMGFMT_BGR16: | 536 case IMGFMT_BGR16: |