From 3d923733e6265ea401e634fe3862a16e94aec14d Mon Sep 17 00:00:00 2001 From: Magnus Olsen Date: Sun, 3 Dec 2006 15:23:44 +0000 Subject: [PATCH] Fixed the initate process so it do not call to StartDirectDrawHel when GUID DDCREATE_HARDWAREONLY Fixed the initate process so it do not call to StartDirectDrawHal when GUID DDCREATE_EMLATIONONLY svn path=/trunk/; revision=25034 --- reactos/dll/directx/ddraw/startup.c | 23 +++++++++++++++++++---- 1 file changed, 19 insertions(+), 4 deletions(-) diff --git a/reactos/dll/directx/ddraw/startup.c b/reactos/dll/directx/ddraw/startup.c index a625d565626..c6249cf3252 100644 --- a/reactos/dll/directx/ddraw/startup.c +++ b/reactos/dll/directx/ddraw/startup.c @@ -175,9 +175,25 @@ StartDirectDraw(LPDIRECTDRAW* iface, LPGUID lpGuid) This->lpLcl->lpDDCB = This->lpLcl->lpGbl->lpDDCBtmp; This->lpLcl->dwProcessId = GetCurrentProcessId(); - hel_ret = StartDirectDrawHel(iface); - hal_ret = StartDirectDrawHal(iface); + switch (devicetypes) + { + case 2: + hal_ret = StartDirectDrawHal(iface); + hel_ret = DD_OK; + This->lpLcl->lpDDCB->HELDD.dwFlags = 0; + break; + case 3: + hel_ret = StartDirectDrawHel(iface); + hal_ret = DD_OK; + This->lpLcl->lpDDCB->HALDD.dwFlags = 0; + break; + + default: + hal_ret = StartDirectDrawHal(iface); + hel_ret = StartDirectDrawHel(iface); + } + if ((hal_ret!=DD_OK) && (hel_ret!=DD_OK)) { DX_STUB_str("DDERR_NODIRECTDRAWSUPPORT"); @@ -946,8 +962,6 @@ Create_DirectDraw (LPGUID pGUID, read dwAppHackFlags flag from the system register instead for hard code it */ This->lpLcl->dwAppHackFlags = 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; @@ -988,6 +1002,7 @@ Create_DirectDraw (LPGUID pGUID, if (StartDirectDraw((LPDIRECTDRAW*)This, pGUID) == DD_OK); { + This->lpLcl->hDD = ddgbl.hDD; return DD_OK; }