[ros-kernel] DirectDraw driver calls patch

Peter Bajusz hyp-x at stormregion.com
Sat Oct 25 01:59:02 CEST 2003


Hi,

I'm quite new here so I don't know who to send this patch to:

This patch adds the DirectDraw driver calls to DRIVER_FUNCTIONS, and the 
initializer to DRIVER_BuildDDIFunctions.
These were incomlete (and "#if 0"d).

The code compiles with this patch.
It shouldn't break anything - nothing calls these functions (yet).

-- 
Peter Bajusz / Stormregion
    Chaos always defeats order, because it's better organized. -- T.P.

-------------- next part --------------
Index: include/win32k/driver.h
===================================================================
RCS file: /CVS/ReactOS/reactos/include/win32k/driver.h,v
retrieving revision 1.8
diff -u -p -r1.8 driver.h
--- include/win32k/driver.h	8 Sep 2002 10:22:35 -0000	1.8
+++ include/win32k/driver.h	24 Oct 2003 22:48:59 -0000
@@ -88,6 +88,11 @@ typedef LONG STDCALL (*PGD_DESCRIBEPIXEL
 typedef BOOL STDCALL (*PGD_SWAPBUFFERS)(PSURFOBJ, PWNDOBJ);
 typedef BOOL STDCALL (*PGD_STARTBANDING)(PSURFOBJ, PPOINTL);
 typedef BOOL STDCALL (*PGD_NEXTBAND)(PSURFOBJ, PPOINTL);
+
+typedef BOOL STDCALL (*PGD_GETDIRECTDRAWINFO)(DHPDEV, PDD_HALINFO, PDWORD, PVIDEOMEMORY, PDWORD, PDWORD);
+typedef BOOL STDCALL (*PGD_ENABLEDIRECTDRAW)(DHPDEV, PDD_CALLBACKS, PDD_SURFACECALLBACKS, PDD_PALETTECALLBACKS);
+typedef VOID STDCALL (*PGD_DISABLEDIRECTDRAW)(DHPDEV);
+
 typedef LONG STDCALL (*PGD_QUERYSPOOLTYPE)(DHPDEV, LPWSTR);
 
 
@@ -147,11 +152,9 @@ typedef struct _DRIVER_FUNCTIONS
   PGD_SWAPBUFFERS  SwapBuffers;
   PGD_STARTBANDING  StartBanding;
   PGD_NEXTBAND  NextBand;
-#if 0
-  PGD_GETDIRECTDRAWINFO,
-  PGD_ENABLEDIRECTDRAW,
-  PGD_DISABLEDIRECTDRAW,
-#endif
+  PGD_GETDIRECTDRAWINFO  GetDirectDrawInfo;
+  PGD_ENABLEDIRECTDRAW  EnableDirectDraw;
+  PGD_DISABLEDIRECTDRAW  DisableDirectDraw;
   PGD_QUERYSPOOLTYPE  QuerySpoolType;
 } DRIVER_FUNCTIONS, *PDRIVER_FUNCTIONS;
 
Index: subsys/win32k/misc/driver.c
===================================================================
RCS file: /CVS/ReactOS/reactos/subsys/win32k/misc/driver.c,v
retrieving revision 1.29
diff -u -p -r1.29 driver.c
--- subsys/win32k/misc/driver.c	24 Oct 2003 08:22:29 -0000	1.29
+++ subsys/win32k/misc/driver.c	24 Oct 2003 22:49:23 -0000
@@ -224,11 +224,9 @@ BOOL DRIVER_BuildDDIFunctions(PDRVENABLE
     if(DED->pdrvfn[i].iFunc == INDEX_DrvSwapBuffers)     DF->SwapBuffers = (PGD_SWAPBUFFERS)DED->pdrvfn[i].pfn;
     if(DED->pdrvfn[i].iFunc == INDEX_DrvStartBanding)    DF->StartBanding = (PGD_STARTBANDING)DED->pdrvfn[i].pfn;
     if(DED->pdrvfn[i].iFunc == INDEX_DrvNextBand)        DF->NextBand = (PGD_NEXTBAND)DED->pdrvfn[i].pfn;
-#if 0
-    if(DED->pdrvfn[i].iFunc == INDEX_DrvGetDirectDrawInfo) DF->GETDIRECTDRAWINFO = (PGD_)DED->pdrvfn[i].pfn;
-    if(DED->pdrvfn[i].iFunc == INDEX_DrvEnableDirectDraw)  DF->ENABLEDIRECTDRAW = (PGD_)DED->pdrvfn[i].pfn;
-    if(DED->pdrvfn[i].iFunc == INDEX_DrvDisableDirectDraw) DF->DISABLEDIRECTDRAW = (PGD_)DED->pdrvfn[i].pfn;
-#endif
+    if(DED->pdrvfn[i].iFunc == INDEX_DrvGetDirectDrawInfo) DF->GetDirectDrawInfo = (PGD_GETDIRECTDRAWINFO)DED->pdrvfn[i].pfn;
+    if(DED->pdrvfn[i].iFunc == INDEX_DrvEnableDirectDraw)  DF->EnableDirectDraw = (PGD_ENABLEDIRECTDRAW)DED->pdrvfn[i].pfn;
+    if(DED->pdrvfn[i].iFunc == INDEX_DrvDisableDirectDraw) DF->DisableDirectDraw = (PGD_DISABLEDIRECTDRAW)DED->pdrvfn[i].pfn;
     if(DED->pdrvfn[i].iFunc == INDEX_DrvQuerySpoolType)  DF->QuerySpoolType = (PGD_QUERYSPOOLTYPE)DED->pdrvfn[i].pfn;
   }
 


More information about the Ros-kernel mailing list