Mercurial > mplayer.hg
comparison libvo/vo_xmga.c @ 5158:3dbceaff9f77
uninit bugs fixed
author | arpi |
---|---|
date | Sun, 17 Mar 2002 03:38:16 +0000 |
parents | 18690b95b24c |
children | 80fbb03b385a |
comparison
equal
deleted
inserted
replaced
5157:f67b321e1eda | 5158:3dbceaff9f77 |
---|---|
183 #endif | 183 #endif |
184 | 184 |
185 vo_mga_flip_page(); | 185 vo_mga_flip_page(); |
186 } | 186 } |
187 | 187 |
188 static int inited=0; | |
189 | |
188 static uint32_t config( uint32_t width, uint32_t height, uint32_t d_width, uint32_t d_height, uint32_t fullscreen, char *title, uint32_t format,const vo_tune_info_t* info) | 190 static uint32_t config( uint32_t width, uint32_t height, uint32_t d_width, uint32_t d_height, uint32_t fullscreen, char *title, uint32_t format,const vo_tune_info_t* info) |
189 { | 191 { |
190 char * frame_mem; | 192 char * frame_mem; |
191 // uint32_t frame_size; | 193 // uint32_t frame_size; |
192 // int mScreen; | 194 // int mScreen; |
263 case 24: fgColor=0x00ff00ffL; break; | 265 case 24: fgColor=0x00ff00ffL; break; |
264 case 16: fgColor=0xf81fL; break; | 266 case 16: fgColor=0xf81fL; break; |
265 case 15: fgColor=0x7c1fL; break; | 267 case 15: fgColor=0x7c1fL; break; |
266 default: printf( "Sorry, this (%d) color depth not supported.\n",vo_depthonscreen ); return -1; | 268 default: printf( "Sorry, this (%d) color depth not supported.\n",vo_depthonscreen ); return -1; |
267 } | 269 } |
270 | |
271 inited=1; | |
268 | 272 |
269 aspect(&d_width,&d_height,A_NOZOOM); | 273 aspect(&d_width,&d_height,A_NOZOOM); |
270 #ifdef HAVE_NEW_GUI | 274 #ifdef HAVE_NEW_GUI |
271 if ( vo_window == None ) | 275 if ( vo_window == None ) |
272 { | 276 { |
347 | 351 |
348 | 352 |
349 static void | 353 static void |
350 uninit(void) | 354 uninit(void) |
351 { | 355 { |
356 if(!inited) return; | |
357 inited=0; | |
358 mga_uninit(); | |
352 saver_on(mDisplay); | 359 saver_on(mDisplay); |
353 #ifdef HAVE_NEW_GUI | 360 vo_x11_uninit(mDisplay, vo_window); |
354 if ( vo_window == None ) | |
355 #endif | |
356 { | |
357 XDestroyWindow( mDisplay,vo_window ); | |
358 } | |
359 mga_uninit(); | |
360 printf("vo: uninit!\n"); | 361 printf("vo: uninit!\n"); |
361 } | 362 } |
362 | 363 |