Do not crash in GetDC, mplayer company we do not have a backbuffer now. good news...
authorMagnus Olsen <magnus@greatlord.com>
Wed, 13 Dec 2006 23:19:20 +0000 (23:19 +0000)
committerMagnus Olsen <magnus@greatlord.com>
Wed, 13 Dec 2006 23:19:20 +0000 (23:19 +0000)
svn path=/trunk/; revision=25152

reactos/dll/directx/ddraw/main/surface_main.c

index 5408e7c..186f093 100644 (file)
@@ -493,20 +493,7 @@ Main_DDrawSurface_GetDC(LPDIRECTDRAWSURFACE7 iface, HDC *phDC)
 
     This = (LPDDRAWI_DDRAWSURFACE_INT)iface;        
 
-    /*
-      FIXME check if the surface exists or not
-      for now we aussme the surface exits and create the hDC for it
-    */
-     
-       if ((HDC)This->lpLcl->hDC == NULL)
-    {
-               This->lpLcl->hDC = (ULONG_PTR)GetDC((HWND)This->lpLcl->lpGbl->lpDD->lpExclusiveOwner->hWnd);
-        *phDC = (HDC)This->lpLcl->hDC;
-    }
-    else
-    {
-       *phDC =  (HDC)This->lpLcl->hDC;
-    }
+    *phDC = This->lpLcl->lpSurfMore->lpDD_lcl->hDC;
 
     return DD_OK;
 }