[ros-diffs] [greatlrd] 26178: 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

greatlrd at svn.reactos.org greatlrd at svn.reactos.org
Mon Mar 26 09:49:05 CEST 2007


Author: greatlrd
Date: Mon Mar 26 11:49:05 2007
New Revision: 26178

URL: http://svn.reactos.org/svn/reactos?rev=26178&view=rev
Log:
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

Modified:
    trunk/reactos/subsystems/win32/win32k/ntddraw/ddraw.c

Modified: trunk/reactos/subsystems/win32/win32k/ntddraw/ddraw.c
URL: http://svn.reactos.org/svn/reactos/trunk/reactos/subsystems/win32/win32k/ntddraw/ddraw.c?rev=26178&r1=26177&r2=26178&view=diff
==============================================================================
--- trunk/reactos/subsystems/win32/win32k/ntddraw/ddraw.c (original)
+++ trunk/reactos/subsystems/win32/win32k/ntddraw/ddraw.c Mon Mar 26 11:49:05 2007
@@ -12,7 +12,6 @@
 
 //#define NDEBUG
 #include <debug.h>
-GDIDEVICE IntGetPrimarySurface(VOID);
 
 /* swtich this off to get rid of all dx debug msg */
 #define DX_DEBUG
@@ -107,9 +106,11 @@
          */
         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 @@
 
         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,15 +173,15 @@
             {
                 /* 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, 




More information about the Ros-diffs mailing list