[ros-diffs] [greatlrd] 33162: adding more code for init the drv in intEnableReactXDriver

greatlrd at svn.reactos.org greatlrd at svn.reactos.org
Sun Apr 27 14:11:00 CEST 2008


Author: greatlrd
Date: Sun Apr 27 07:11:00 2008
New Revision: 33162

URL: http://svn.reactos.org/svn/reactos?rev=33162&view=rev
Log:
adding more code for init the drv in intEnableReactXDriver

Modified:
    trunk/reactos/include/reactos/drivers/directx/directxint.h
    trunk/reactos/subsystems/win32/win32k/ntddraw/ddraw.c
    trunk/reactos/subsystems/win32/win32k/win32k.rbuild

Modified: trunk/reactos/include/reactos/drivers/directx/directxint.h
URL: http://svn.reactos.org/svn/reactos/trunk/reactos/include/reactos/drivers/directx/directxint.h?rev=33162&r1=33161&r2=33162&view=diff
==============================================================================
--- trunk/reactos/include/reactos/drivers/directx/directxint.h [iso-8859-1] (original)
+++ trunk/reactos/include/reactos/drivers/directx/directxint.h [iso-8859-1] Sun Apr 27 07:11:00 2008
@@ -129,8 +129,8 @@
 /* 0x040 */    DD_HALINFO ddHalInfo;
 /* 0x1E0 */    ULONG unk_1e0[46];
 /* 0x298 */    DD_CALLBACKS ddCallbacks;                    // 0x298 <-- verify it match windows xp, ddCallbacks
-/* 0x2C0 */    DD_SURFACECALLBACKS ddSurfaceCallbacks;      // 0x2C0 <-- verify it match windows xp, ddCallbacks
-/* 0x304 */    DD_PALETTECALLBACKS ddPaletteCallbacks;
+/* 0x2C0 */    DD_SURFACECALLBACKS ddSurfaceCallbacks;      // 0x2C0 <-- verify it match windows xp, ddSurfaceCallbacks
+/* 0x304 */    DD_PALETTECALLBACKS ddPaletteCallbacks;      // 0x304 <-- verify it match windows xp, ddPaletteCallbacks
 /* 0x314 */    ULONG unk_314[46];
 /* 0x3D4 */    D3DNTHAL_CALLBACKS d3dNtHalCallbacks;
 /* 0x460 */    ULONG unk_460[7];

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=33162&r1=33161&r2=33162&view=diff
==============================================================================
--- trunk/reactos/subsystems/win32/win32k/ntddraw/ddraw.c [iso-8859-1] (original)
+++ trunk/reactos/subsystems/win32/win32k/ntddraw/ddraw.c [iso-8859-1] Sun Apr 27 07:11:00 2008
@@ -34,6 +34,7 @@
 {
     PGDIDEVICE pDev = (PGDIDEVICE)pDC->pPDev;
     BOOLEAN success = FALSE;
+    DD_GETDRIVERINFODATA GetInfo;
 
     /*clean up some of the cache entry */
     RtlZeroMemory(pEddgbl,sizeof(EDD_DIRECTDRAW_GLOBAL));
@@ -163,8 +164,33 @@
         return FALSE;
     }
 
+    /* Fill in DD_MISCELLANEOUSCALLBACKS */
+    GetInfo.dhpdev = pDC->PDev;
+
+    /* Note this check will fail on some nvida drv, it is a bug in their drv not in our code, 
+     * we doing proper check if GetDriverInfo exists */
+    if  ( ((pEddgbl->ddHalInfo.dwFlags & (DDHALINFO_GETDRIVERINFOSET | DDHALINFO_GETDRIVERINFO2)) != 0) &&
+          (pEddgbl->ddHalInfo.GetDriverInfo != NULL) )
+    {
+        GetInfo.dwSize = sizeof (DD_GETDRIVERINFODATA);
+        GetInfo.dwFlags = 0x00;
+        GetInfo.guidInfo = GUID_MiscellaneousCallbacks;
+        GetInfo.lpvData = (PVOID)&pEddgbl->ddMiscellanousCallbacks;
+        GetInfo.dwExpectedSize = sizeof (DD_MISCELLANEOUSCALLBACKS);
+        GetInfo.ddRVal = DDERR_GENERIC;
+        if ( ( pEddgbl->ddHalInfo.GetDriverInfo (&GetInfo) == DDHAL_DRIVER_NOTHANDLED) || 
+             (GetInfo.ddRVal != DD_OK) )
+        {
+            DPRINT1(" Fail : did not get DD_MISCELLANEOUSCALLBACKS \n");
+        }
+    }
+    else
+    {
+        DPRINT1(" Fail : did not foundpEddgbl->ddHalInfo.GetDriverInfo \n");
+    }
+
     /* setup missing data in ddHalInfo */
-    pEddgbl->ddHalInfo.GetDriverInfo = (PVOID)pDev->DriverFunctions.GetDirectDrawInfo;
+    //pEddgbl->ddHalInfo.GetDriverInfo = (PVOID)pDev->DriverFunctions.GetDirectDrawInfo;
 
     /* FIXME : remove this when we are done with debuging of dxg */
     dump_edd_directdraw_global(pEddgbl);
@@ -844,10 +870,10 @@
     DPRINT1("0x%08lx PEDD_DIRECTDRAW_GLOBAL->ddSurfaceCallbacks.UpdateOverlay               : 0x%08lx\n",(((DWORD)&pEddgbl->ddSurfaceCallbacks.UpdateOverlay) - (DWORD)pEddgbl),pEddgbl->ddSurfaceCallbacks.UpdateOverlay);
     DPRINT1("0x%08lx PEDD_DIRECTDRAW_GLOBAL->ddSurfaceCallbacks.SetOverlayPosition          : 0x%08lx\n",(((DWORD)&pEddgbl->ddSurfaceCallbacks.SetOverlayPosition) - (DWORD)pEddgbl),pEddgbl->ddSurfaceCallbacks.SetOverlayPosition);
     DPRINT1("0x%08lx PEDD_DIRECTDRAW_GLOBAL->ddSurfaceCallbacks.reserved4                   : 0x%08lx\n",(((DWORD)&pEddgbl->ddSurfaceCallbacks.reserved4) - (DWORD)pEddgbl),pEddgbl->ddSurfaceCallbacks.reserved4);
-    DPRINT1("0x%08lx PEDD_DIRECTDRAW_GLOBAL->ddSurfaceCallbacks.SetPalette                  : 0x%08lx\n",(((DWORD)&pEddgbl->ddSurfaceCallbacks.SetPalette) - (DWORD)pEddgbl),pEddgbl->ddSurfaceCallbacks.SetPalette);
-
-    // DD_PALETTECALLBACKS ddPaletteCallbacks;
-    DPRINT1("0x%08lx PEDD_DIRECTDRAW_GLOBAL->ddPaletteCallbacks                             : 0x%08lx\n",(((DWORD)&pEddgbl->ddPaletteCallbacks) - (DWORD)pEddgbl),pEddgbl->ddPaletteCallbacks);
+    DPRINT1("0x%08lx PEDD_DIRECTDRAW_GLOBAL->ddPaletteCallbacks.dwSize                      : 0x%08lx\n",(((DWORD)&pEddgbl->ddPaletteCallbacks.dwSize) - (DWORD)pEddgbl),pEddgbl->ddPaletteCallbacks.dwSize);
+    DPRINT1("0x%08lx PEDD_DIRECTDRAW_GLOBAL->ddPaletteCallbacks.dwFlags                     : 0x%08lx\n",(((DWORD)&pEddgbl->ddPaletteCallbacks.dwFlags) - (DWORD)pEddgbl),pEddgbl->ddPaletteCallbacks.dwFlags);
+    DPRINT1("0x%08lx PEDD_DIRECTDRAW_GLOBAL->ddPaletteCallbacks.DestroyPalette              : 0x%08lx\n",(((DWORD)&pEddgbl->ddPaletteCallbacks.DestroyPalette) - (DWORD)pEddgbl),pEddgbl->ddPaletteCallbacks.DestroyPalette);
+    DPRINT1("0x%08lx PEDD_DIRECTDRAW_GLOBAL->ddPaletteCallbacks.SetEntries                  : 0x%08lx\n",(((DWORD)&pEddgbl->ddPaletteCallbacks.SetEntries) - (DWORD)pEddgbl),pEddgbl->ddPaletteCallbacks.SetEntries);
     DPRINT1("0x%08lx PEDD_DIRECTDRAW_GLOBAL->unk_314[0]                                     : 0x%08lx\n",(((DWORD)&pEddgbl->unk_314[0]) - (DWORD)pEddgbl),pEddgbl->unk_314[0]);
     DPRINT1("0x%08lx PEDD_DIRECTDRAW_GLOBAL->unk_314[1]                                     : 0x%08lx\n",(((DWORD)&pEddgbl->unk_314[1]) - (DWORD)pEddgbl),pEddgbl->unk_314[1]);
     DPRINT1("0x%08lx PEDD_DIRECTDRAW_GLOBAL->unk_314[2]                                     : 0x%08lx\n",(((DWORD)&pEddgbl->unk_314[2]) - (DWORD)pEddgbl),pEddgbl->unk_314[2]);

Modified: trunk/reactos/subsystems/win32/win32k/win32k.rbuild
URL: http://svn.reactos.org/svn/reactos/trunk/reactos/subsystems/win32/win32k/win32k.rbuild?rev=33162&r1=33161&r2=33162&view=diff
==============================================================================
--- trunk/reactos/subsystems/win32/win32k/win32k.rbuild [iso-8859-1] (original)
+++ trunk/reactos/subsystems/win32/win32k/win32k.rbuild [iso-8859-1] Sun Apr 27 07:11:00 2008
@@ -183,6 +183,7 @@
 	<library>ntdll</library>
 	<library>hal</library>
 	<library>freetype</library>
+	<library>dxguid</library>
 	<file>win32k.rc</file>
 </module>
 </group>



More information about the Ros-diffs mailing list