From 24f90dc0c91237dc3c57ce112d600f3c9faaf49b Mon Sep 17 00:00:00 2001 From: Magnus Olsen Date: Mon, 26 Mar 2007 07:49:05 +0000 Subject: [PATCH] we now resive DrvGetDirectDrawInfo DD_HALINFO from the driver to win32k from win32k to gdi32.dll or d3dthk.dll or direcly syscall. it take care of allot bugs in my test case. tested with vmware driver svn path=/trunk/; revision=26178 --- reactos/subsystems/win32/win32k/ntddraw/ddraw.c | 13 ++++++++----- 1 file changed, 8 insertions(+), 5 deletions(-) diff --git a/reactos/subsystems/win32/win32k/ntddraw/ddraw.c b/reactos/subsystems/win32/win32k/ntddraw/ddraw.c index d887e2db00e..d89207aa0c1 100644 --- a/reactos/subsystems/win32/win32k/ntddraw/ddraw.c +++ b/reactos/subsystems/win32/win32k/ntddraw/ddraw.c @@ -12,7 +12,6 @@ //#define NDEBUG #include -GDIDEVICE IntGetPrimarySurface(VOID); /* swtich this off to get rid of all dx debug msg */ #define DX_DEBUG @@ -107,9 +106,11 @@ intEnableDriver(PDD_DIRECTDRAW pDirectDraw) */ if (pDirectDraw->dwNumHeaps != 0) { + DPRINT1("Setup pvmList\n"); pDirectDraw->pvmList = (PVIDEOMEMORY) ExAllocatePoolWithTag(PagedPool, pDirectDraw->dwNumHeaps * sizeof(VIDEOMEMORY), TAG_DXPVMLIST); if (pDirectDraw->pvmList == NULL) { + DPRINT1("pvmList memmery alloc fail\n"); return FALSE; } } @@ -120,10 +121,12 @@ intEnableDriver(PDD_DIRECTDRAW pDirectDraw) if (pDirectDraw->dwNumFourCC != 0) { + DPRINT1("Setup pdwFourCC\n"); pDirectDraw->pdwFourCC = (LPDWORD) ExAllocatePoolWithTag(PagedPool, pDirectDraw->dwNumFourCC * sizeof(DWORD), TAG_DXFOURCC); if (pDirectDraw->pdwFourCC == NULL) { + DPRINT1("pdwFourCC memmery alloc fail\n"); return FALSE; } } @@ -170,16 +173,16 @@ intEnableDriver(PDD_DIRECTDRAW pDirectDraw) { /* Unknown version found */ DPRINT1(" Fail : did not get DD_HALINFO size \n"); - GDIOBJ_UnlockObjByPtr(DdHandleTable, pDirectDraw); return FALSE; } - - /* Copy it to user mode pointer the data */ - RtlCopyMemory(&pDirectDraw->Hal, &HalInfo, sizeof(DD_HALINFO)); } + /* Copy it to user mode pointer the data */ + RtlCopyMemory(&pDirectDraw->Hal, &HalInfo, sizeof(DD_HALINFO)); } + DPRINT1("Trying EnableDirectDraw the driver\n"); + success = pDirectDraw->EnableDirectDraw( pDirectDraw->Global.dhpdev, &pDirectDraw->DD, &pDirectDraw->Surf,