From 3c9294fcf46f6c0f3fe2a67cbf4e01fa77f4ccba Mon Sep 17 00:00:00 2001 From: Magnus Olsen Date: Sun, 3 Dec 2006 09:12:35 +0000 Subject: [PATCH] Fixed so we can optain the HAL again. Do not trust on ddraw value yo get blindy. it will rest the value you need to optian the HAL and you can not spy on it so easy then. svn path=/trunk/; revision=25027 --- reactos/dll/directx/ddraw/startup.c | 22 ++++++++-------------- 1 file changed, 8 insertions(+), 14 deletions(-) diff --git a/reactos/dll/directx/ddraw/startup.c b/reactos/dll/directx/ddraw/startup.c index fc325c22aaf..a625d565626 100644 --- a/reactos/dll/directx/ddraw/startup.c +++ b/reactos/dll/directx/ddraw/startup.c @@ -80,6 +80,7 @@ StartDirectDraw(LPDIRECTDRAW* iface, LPGUID lpGuid) This->lpLcl->lpGbl->lpModeInfo[0].lPitch = (devmode.dmPelsWidth*devmode.dmBitsPerPel)/8; This->lpLcl->lpGbl->lpModeInfo[0].wRefreshRate = (WORD)devmode.dmDisplayFrequency; + if (lpGuid == NULL) { devicetypes = 1; @@ -656,8 +657,6 @@ StartDirectDrawHal(LPDIRECTDRAW* iface) DeleteDC((HDC)This->lpLcl->hDC); return DD_FALSE; } - - return DD_OK; // Do not relase HDC it have been map in kernel mode // DeleteDC(hdc); @@ -941,21 +940,14 @@ Create_DirectDraw (LPGUID pGUID, /* FIXME cleanup */ return DDERR_OUTOFMEMORY; } - - - /* - We need manual fill this struct member we can not trust on - the heap zero the struct if you play to much with directdraw - in Windows 2000. This is a small workaround of one of directdraw - bugs - */ /* FIXME read dwAppHackFlags flag from the system register instead for hard code it */ This->lpLcl->dwAppHackFlags = 0; - This->lpLcl->dwErrorMode = 0; + /* Do mot inistate this value if we do we can not open the HAL interface */ + //This->lpLcl->dwErrorMode = 0; This->lpLcl->dwHotTracking = 0; This->lpLcl->dwIMEState = 0; This->lpLcl->dwLocalFlags = DDRAWILCL_DIRECTDRAW7; @@ -966,7 +958,6 @@ Create_DirectDraw (LPGUID pGUID, supriese for me */ //This->lpLcl->dwObsolete1 = 0; - This->lpLcl->dwPreferredMode = 0; This->lpLcl->dwProcessId = 0; This->lpLcl->dwUnused0 = 0; This->lpLcl->hD3DInstance = NULL; @@ -974,14 +965,17 @@ Create_DirectDraw (LPGUID pGUID, This->lpLcl->hDDVxd = 0; This->lpLcl->hFocusWnd = 0; This->lpLcl->hGammaCalibrator = 0; - This->lpLcl->hWnd = 0; + /* Do mot inistate this value if we do we can not open the HAL interface */ + //This->lpLcl->hWnd = 0; This->lpLcl->hWndPopup = 0; This->lpLcl->lpCB = NULL; This->lpLcl->lpDDCB = NULL; This->lpLcl->lpDDMore = 0; This->lpLcl->lpGammaCalibrator = 0; This->lpLcl->lpGbl = &ddgbl; - This->lpLcl->lpPrimary = NULL; + + /* Do mot inistate this value if we do we can not open the HAL interface */ + //This->lpLcl->lpPrimary = NULL; This->lpLcl->pD3DIUnknown = NULL; This->lpLcl->pUnkOuter = NULL;