Author: greatlrd
Date: Thu Dec 14 02:19:20 2006
New Revision: 25152
URL: http://svn.reactos.org/svn/reactos?rev=25152&view=rev
Log:
Do not crash in GetDC, mplayer company we do not have a backbuffer now. good news, instead for a crash
Modified:
trunk/reactos/dll/directx/ddraw/main/surface_main.c
Modified: trunk/reactos/dll/directx/ddraw/main/surface_main.c
URL: http://svn.reactos.org/svn/reactos/trunk/reactos/dll/directx/ddraw/main/sur…
==============================================================================
--- trunk/reactos/dll/directx/ddraw/main/surface_main.c (original)
+++ trunk/reactos/dll/directx/ddraw/main/surface_main.c Thu Dec 14 02:19:20 2006
@@ -493,20 +493,7 @@
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;
}