Author: greatlrd Date: Fri Jun 15 20:44:15 2007 New Revision: 27191
URL: http://svn.reactos.org/svn/reactos?rev=27191&view=rev Log: Fixing smaller bugs in startup.c it does not set windows handler or use windows handler hdc it create own hdc
Modified: trunk/reactos/dll/directx/ddraw/startup.c
Modified: trunk/reactos/dll/directx/ddraw/startup.c URL: http://svn.reactos.org/svn/reactos/trunk/reactos/dll/directx/ddraw/startup.c... ============================================================================== --- trunk/reactos/dll/directx/ddraw/startup.c (original) +++ trunk/reactos/dll/directx/ddraw/startup.c Fri Jun 15 20:44:15 2007 @@ -172,8 +172,9 @@ } } } - - DX_STUB_str("here\n"); + /* Windows handler are by set of SetCooperLevel + * so do not set it + */
if (reenable == FALSE) { @@ -183,8 +184,8 @@ devicetypes= 1;
/* Create HDC for default, hal and hel driver */ - This->lpLcl->hWnd = (ULONG_PTR) GetActiveWindow(); - This->lpLcl->hDC = (ULONG_PTR) GetDC((HWND)This->lpLcl->hWnd); + // This->lpLcl->hWnd = (ULONG_PTR) GetActiveWindow(); + This->lpLcl->hDC = (ULONG_PTR)CreateDCA("DISPLAY",NULL,NULL,NULL);
/* cObsolete is undoc in msdn it being use in CreateDCA */ RtlCopyMemory(&ddgbl.cObsolete,&"DISPLAY",7); @@ -197,8 +198,8 @@ { devicetypes = 2; /* Create HDC for default, hal driver */ - This->lpLcl->hWnd =(ULONG_PTR) GetActiveWindow(); - This->lpLcl->hDC = (ULONG_PTR) GetDC((HWND)This->lpLcl->hWnd); + // This->lpLcl->hWnd =(ULONG_PTR) GetActiveWindow(); + This->lpLcl->hDC = (ULONG_PTR)CreateDCA("DISPLAY",NULL,NULL,NULL);
/* cObsolete is undoc in msdn it being use in CreateDCA */ RtlCopyMemory(&ddgbl.cObsolete,&"DISPLAY",7); @@ -210,8 +211,8 @@ devicetypes = 3;
/* Create HDC for default, hal and hel driver */ - This->lpLcl->hWnd = (ULONG_PTR) GetActiveWindow(); - This->lpLcl->hDC = (ULONG_PTR) GetDC((HWND)This->lpLcl->hWnd); + //This->lpLcl->hWnd = (ULONG_PTR) GetActiveWindow(); + This->lpLcl->hDC = (ULONG_PTR)CreateDCA("DISPLAY",NULL,NULL,NULL);
/* cObsolete is undoc in msdn it being use in CreateDCA */ RtlCopyMemory(&ddgbl.cObsolete,&"DISPLAY",7); @@ -225,15 +226,17 @@ * the register. we do not support that yet */ devicetypes = 4; - This->lpLcl->hDC = (ULONG_PTR) NULL ; - This->lpLcl->hWnd = (ULONG_PTR) GetActiveWindow(); - } - + //This->lpLcl->hDC = (ULONG_PTR) NULL ; + //This->lpLcl->hDC = (ULONG_PTR)CreateDCA("DISPLAY",NULL,NULL,NULL); + } + + /* if ( (HDC)This->lpLcl->hDC == NULL) { DX_STUB_str("DDERR_OUTOFMEMORY\n"); return DDERR_OUTOFMEMORY ; } + */ }
This->lpLcl->lpDDCB = ddgbl.lpDDCBtmp; @@ -585,6 +588,11 @@ */ }
+ if (mHALInfo.dwFlags & DDHALINFO_GETDRIVERINFO2) + { + This->lpLcl->lpGbl->dwFlags = This->lpLcl->lpGbl->dwFlags | DDRAWI_DRIVERINFO2; + } +
return DD_OK; }