summaryrefslogtreecommitdiffstats
path: root/libvo/vo_xmga.c
diff options
context:
space:
mode:
authorarpi <arpi@b3059339-0415-0410-9bf9-f77b7e298cf2>2002-03-17 03:38:16 +0000
committerarpi <arpi@b3059339-0415-0410-9bf9-f77b7e298cf2>2002-03-17 03:38:16 +0000
commitf19ef5a1ff47d1e7d4a3d28c4841d7024b4e19e7 (patch)
treec97ff8ca1b5a8fda63773e5fb373e1e4c75e2513 /libvo/vo_xmga.c
parent8a77bc1aecefed6999b7d22b1ae885f5413a0c7b (diff)
downloadmpv-f19ef5a1ff47d1e7d4a3d28c4841d7024b4e19e7.tar.bz2
mpv-f19ef5a1ff47d1e7d4a3d28c4841d7024b4e19e7.tar.xz
uninit bugs fixed
git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@5159 b3059339-0415-0410-9bf9-f77b7e298cf2
Diffstat (limited to 'libvo/vo_xmga.c')
-rw-r--r--libvo/vo_xmga.c15
1 files changed, 8 insertions, 7 deletions
diff --git a/libvo/vo_xmga.c b/libvo/vo_xmga.c
index f227bc690c..10ce8477b7 100644
--- a/libvo/vo_xmga.c
+++ b/libvo/vo_xmga.c
@@ -185,6 +185,8 @@ static void flip_page(void){
vo_mga_flip_page();
}
+static int inited=0;
+
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)
{
char * frame_mem;
@@ -266,6 +268,8 @@ static uint32_t config( uint32_t width, uint32_t height, uint32_t d_width, uint3
default: printf( "Sorry, this (%d) color depth not supported.\n",vo_depthonscreen ); return -1;
}
+ inited=1;
+
aspect(&d_width,&d_height,A_NOZOOM);
#ifdef HAVE_NEW_GUI
if ( vo_window == None )
@@ -349,14 +353,11 @@ static const vo_info_t* get_info( void )
static void
uninit(void)
{
- saver_on(mDisplay);
-#ifdef HAVE_NEW_GUI
- if ( vo_window == None )
-#endif
- {
- XDestroyWindow( mDisplay,vo_window );
- }
+ if(!inited) return;
+ inited=0;
mga_uninit();
+ saver_on(mDisplay);
+ vo_x11_uninit(mDisplay, vo_window);
printf("vo: uninit!\n");
}