changeset 7778:f804db78f704

10l - noticed by Soeren Mueller <soeren.mueller at webwasher.com>
author faust3
date Thu, 17 Oct 2002 13:17:56 +0000
parents ed7b05575aab
children f3166c864e9e
files libvo/vo_directx.c
diffstat 1 files changed, 5 insertions(+), 4 deletions(-) [+]
line wrap: on
line diff
--- a/libvo/vo_directx.c	Thu Oct 17 09:49:25 2002 +0000
+++ b/libvo/vo_directx.c	Thu Oct 17 13:17:56 2002 +0000
@@ -45,6 +45,7 @@
 static LPDIRECTDRAWSURFACE  g_lpddsBack = NULL;     //Back surface
 static LPDIRECTDRAWCLIPPER  g_lpddclipper;          //clipper object, can only be used without overlay
 static DDSURFACEDESC		ddsdsf;                 //surface descripiton needed for locking
+static HINSTANCE            hddraw_dll;             //handle to ddraw.dll
 static RECT                 rd;                     //rect of our stretched image
 static RECT                 rs;                     //rect of our source image
 static HWND                 hWnd=NULL;              //handle to the window
@@ -330,12 +331,14 @@
 	mp_msg(MSGT_VO, MSGL_DBG3,"<vo_directx><INFO>window destroyed\n");
 	if (g_lpdd != NULL) g_lpdd->lpVtbl->Release(g_lpdd);
 	mp_msg(MSGT_VO, MSGL_DBG3,"<vo_directx><INFO>directdrawobject released\n");
+	FreeLibrary( hddraw_dll);
+	hddraw_dll= NULL;
+	mp_msg(MSGT_VO, MSGL_DBG3,"<vo_directx><INFO>ddraw.dll freed\n");
 	mp_msg(MSGT_VO, MSGL_DBG3,"<vo_directx><INFO>uninited\n");    
 }
 
 static uint32_t Directx_InitDirectDraw()
 {
-    HINSTANCE  hddraw_dll;
 	HRESULT    (WINAPI *OurDirectDrawCreate)(GUID *,LPDIRECTDRAW *,IUnknown *);
  	LPDIRECTDRAW lpDDraw;
 	mp_msg(MSGT_VO, MSGL_DBG3,"<vo_directx><INFO>Initing DirectDraw\n" );
@@ -372,9 +375,7 @@
     }
 	//release our old interface and free ddraw.dll
     lpDDraw->lpVtbl->Release(lpDDraw);
- 	FreeLibrary( hddraw_dll);
-	hddraw_dll= NULL;
-	mp_msg(MSGT_VO, MSGL_DBG3,"<vo_directx><INFO>lpDDraw released & hddraw freed\n" );
+	mp_msg(MSGT_VO, MSGL_DBG3,"<vo_directx><INFO>lpDDraw released\n" );
 	//set cooperativelevel: for our tests, no handle to a window is needed
 	if (g_lpdd->lpVtbl->SetCooperativeLevel(g_lpdd, NULL, DDSCL_NORMAL) != DD_OK)
     {