[ros-diffs] [greatlrd] 33164: add DD_VIDEOPORTCALLBACKS it mean directx video port interface should started working now to user mode, with ms dxg.sys

greatlrd at svn.reactos.org greatlrd at svn.reactos.org
Sun Apr 27 15:05:13 CEST 2008


Author: greatlrd
Date: Sun Apr 27 08:05:13 2008
New Revision: 33164

URL: http://svn.reactos.org/svn/reactos?rev=33164&view=rev
Log:
add DD_VIDEOPORTCALLBACKS it mean directx video port interface should started working now to user mode, with ms dxg.sys

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

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=33164&r1=33163&r2=33164&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 08:05:13 2008
@@ -96,10 +96,12 @@
 
 
 /* NOTE :
- * if EDDDGBL_MISCCALLBACKS been set in  struct EDD_DIRECTDRAW_GLOBAL member dwCallbackFlags,
+ * if these  been set in  struct EDD_DIRECTDRAW_GLOBAL member dwCallbackFlags,
  * it mean that the callback member for it have been fill in from the graphic drv
  */
-#define EDDDGBL_MISCCALLBACKS       0x01;
+#define EDDDGBL_MISCCALLBACKS           0x01; // ddMiscellanousCallbacks
+#define EDDDGBL_VIDEOPORTCALLBACKS      0x02; // ddVideoPortCallback
+
 typedef struct _EDD_DIRECTDRAW_GLOBAL
 {
 /* 0x000 */    PVOID dhpdev;
@@ -110,7 +112,6 @@
 /* 0x01C */    ULONG unk_01c;
 /* 0x020 */    DWORD dwCallbackFlags; /* <-- verify it match windows xp, dwCallbackFlags
                                          Flags value 
-                                         0x0001 = ddMiscellanousCallbacks
                                          0x0002 = ddVideoPortCallback and GUID_VideoPortCaps
                                          0x0004 = GUID_ColorControlCallbacks
                                          0x0040 = GUID_MotionCompCallbacks
@@ -140,7 +141,7 @@
 /* 0x3D4 */    D3DNTHAL_CALLBACKS d3dNtHalCallbacks;
 /* 0x460 */    ULONG unk_460[7];
 /* 0x47C */    D3DNTHAL_CALLBACKS2 d3dNtHalCallbacks2;
-/* 0x498 */    DD_VIDEOPORTCALLBACKS  ddVideoPortCallback;             // 0x498 <-- verify it match windows xp, ddVideoPortCallback
+/* 0x498 */    DD_VIDEOPORTCALLBACKS ddVideoPortCallback;              // 0x498 <-- verify it match windows xp, ddVideoPortCallback
 /* 0x4E0 */    DD_MISCELLANEOUSCALLBACKS ddMiscellanousCallbacks;      // 0x4E0 <-- verify it match windows xp, ddMiscellanousCallbacks
 /* 0x4EC */    ULONG unk_4ec[18];
 /* 0x534 */    D3DNTHAL_CALLBACKS3 d3dNtHalCallbacks3;

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=33164&r1=33163&r2=33164&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 08:05:13 2008
@@ -164,14 +164,44 @@
         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.dhpdev = pDC->PDev;
+        GetInfo.dwSize = sizeof (DD_GETDRIVERINFODATA);
+        GetInfo.dwFlags = 0x00;
+        GetInfo.guidInfo = GUID_VideoPortCallbacks;
+        GetInfo.lpvData = (PVOID)&pEddgbl->ddVideoPortCallback;
+        GetInfo.dwExpectedSize = sizeof (DD_VIDEOPORTCALLBACKS);
+        GetInfo.ddRVal = DDERR_GENERIC;
+        if ( ( pEddgbl->ddHalInfo.GetDriverInfo (&GetInfo) == DDHAL_DRIVER_NOTHANDLED) || 
+             (GetInfo.ddRVal != DD_OK) )
+        {
+            DPRINT1(" Fail : did not get DD_VIDEOPORTCALLBACKS \n");
+        }
+        else
+        {
+            pEddgbl->dwCallbackFlags |= EDDDGBL_VIDEOPORTCALLBACKS;
+        }
+
+        /* FIXME fill in videoport caps */
+    }
+    else
+    {
+        DPRINT1(" Fail : did not foundpEddgbl->ddHalInfo.GetDriverInfo \n");
+    }
+
+    /* 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.dhpdev = pDC->PDev;
         GetInfo.dwSize = sizeof (DD_GETDRIVERINFODATA);
         GetInfo.dwFlags = 0x00;
         GetInfo.guidInfo = GUID_MiscellaneousCallbacks;



More information about the Ros-diffs mailing list