Add DirectDraw driver calls to DRIVER_FUNCTIONS and the initializer to
authorGé van Geldorp <ge@gse.nl>
Sat, 25 Oct 2003 18:45:13 +0000 (18:45 +0000)
committerGé van Geldorp <ge@gse.nl>
Sat, 25 Oct 2003 18:45:13 +0000 (18:45 +0000)
DRIVER_BuildDDIFunctions. Patch by Peter Bajusz.

svn path=/trunk/; revision=6433

reactos/include/win32k/driver.h
reactos/subsys/win32k/misc/driver.c

index ccd4e16..f3eb49b 100644 (file)
@@ -88,6 +88,11 @@ typedef LONG STDCALL (*PGD_DESCRIBEPIXELFORMAT)(DHPDEV, LONG, ULONG,
 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 8288189..66dca6e 100644 (file)
@@ -16,7 +16,7 @@
  *  along with this program; if not, write to the Free Software
  *  Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
  */
-/* $Id: driver.c,v 1.29 2003/10/24 08:22:29 gvg Exp $
+/* $Id: driver.c,v 1.30 2003/10/25 18:45:13 gvg Exp $
  * 
  * GDI Driver support routines
  * (mostly swiped from Wine)
@@ -224,11 +224,9 @@ BOOL DRIVER_BuildDDIFunctions(PDRVENABLEDATA  DED,
     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;
   }