# HG changeset patch # User faust3 # Date 1034860676 0 # Node ID f804db78f70408e091de2449d84b9f4c9dd6d7dd # Parent ed7b05575aab4167cfdf5e71b4e93973c633a65a 10l - noticed by Soeren Mueller diff -r ed7b05575aab -r f804db78f704 libvo/vo_directx.c --- 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,"window destroyed\n"); if (g_lpdd != NULL) g_lpdd->lpVtbl->Release(g_lpdd); mp_msg(MSGT_VO, MSGL_DBG3,"directdrawobject released\n"); + FreeLibrary( hddraw_dll); + hddraw_dll= NULL; + mp_msg(MSGT_VO, MSGL_DBG3,"ddraw.dll freed\n"); mp_msg(MSGT_VO, MSGL_DBG3,"uninited\n"); } static uint32_t Directx_InitDirectDraw() { - HINSTANCE hddraw_dll; HRESULT (WINAPI *OurDirectDrawCreate)(GUID *,LPDIRECTDRAW *,IUnknown *); LPDIRECTDRAW lpDDraw; mp_msg(MSGT_VO, MSGL_DBG3,"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,"lpDDraw released & hddraw freed\n" ); + mp_msg(MSGT_VO, MSGL_DBG3,"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) {