Index: drivers/directx/dxg/dxg_driver.h =================================================================== --- drivers/directx/dxg/dxg_driver.h (revision 43159) +++ drivers/directx/dxg/dxg_driver.h (working copy) @@ -1,98 +1,3 @@ -DRVFN gaDxgFuncs [] = -{ - {DXG_INDEX_DxDxgGenericThunk, (PFN)DxDxgGenericThunk}, - //{DXG_INDEX_DxD3dContextCreate, (PFN)DxD3dContextCreate}, - //{DXG_INDEX_DxD3dContextDestroy, (PFN)DxD3dContextDestroy}, - //{DXG_INDEX_DxD3dContextDestroyAll, (PFN)DxD3dContextDestroyAll}, - //{DXG_INDEX_DxD3dValidateTextureStageState, (PFN)DxD3dValidateTextureStageState}, - //{DXG_INDEX_DxD3dDrawPrimitives2, (PFN)DxD3dDrawPrimitives2}, - //{DXG_INDEX_DxDdGetDriverState, (PFN)DxDdGetDriverState}, - //{DXG_INDEX_DxDdAddAttachedSurface, (PFN)DxDdAddAttachedSurface}, - //{DXG_INDEX_DxDdAlphaBlt, (PFN)DxDdAlphaBlt}, - //{DXG_INDEX_DxDdAttachSurface, (PFN)DxDdAttachSurface}, - //{DXG_INDEX_DxDdBeginMoCompFrame, (PFN)DxDdBeginMoCompFrame}, - //{DXG_INDEX_DxDdBlt, (PFN)DxDdBlt}, - //{DXG_INDEX_DxDdCanCreateSurface, (PFN)DxDdCanCreateSurface}, - //{DXG_INDEX_DxDdCanCreateD3DBuffer, (PFN)DxDdCanCreateD3DBuffer}, - //{DXG_INDEX_DxDdColorControl, (PFN)DxDdColorControl}, - //{DXG_INDEX_DxDdCreateDirectDrawObject, (PFN)DxDdCreateDirectDrawObject}, - //{DXG_INDEX_DxDdCreateSurface, (PFN)DxDdCreateD3DBuffer}, - //{DXG_INDEX_DxDdCreateD3DBuffer, (PFN)DxDdCreateD3DBuffer}, - //{DXG_INDEX_DxDdCreateMoComp, (PFN)DxDdCreateMoComp}, - //{DXG_INDEX_DxDdCreateSurfaceObject, (PFN)DxDdCreateSurfaceObject}, - //{DXG_INDEX_DxDdDeleteDirectDrawObject, (PFN)DxDdDeleteDirectDrawObject}, - //{DXG_INDEX_DxDdDeleteSurfaceObject, (PFN)DxDdDeleteSurfaceObject}, - //{DXG_INDEX_DxDdDestroyMoComp, (PFN)DxDdDestroyMoComp}, - //{DXG_INDEX_DxDdDestroySurface, (PFN)DxDdDestroySurface}, - //{DXG_INDEX_DxDdDestroyD3DBuffer, (PFN)DxDdDestroyD3DBuffer}, - //{DXG_INDEX_DxDdEndMoCompFrame, (PFN)DxDdEndMoCompFrame}, - //{DXG_INDEX_DxDdFlip, (PFN)DxDdFlip}, - //{DXG_INDEX_DxDdFlipToGDISurface, (PFN)DxDdFlipToGDISurface}, - //{DXG_INDEX_DxDdGetAvailDriverMemory, (PFN)DxDdGetAvailDriverMemory}, - //{DXG_INDEX_DxDdGetBltStatus, (PFN)DxDdGetBltStatus}, - //{DXG_INDEX_DxDdGetDC, (PFN)DxDdGetDC}, - //{DXG_INDEX_DxDdGetDriverInfo, (PFN)DxDdGetDriverInfo}, - //{DXG_INDEX_DxDdGetDxHandle, (PFN)DxDdGetDxHandle}, - //{DXG_INDEX_DxDdGetFlipStatus, (PFN)DxDdGetFlipStatus}, - //{DXG_INDEX_DxDdGetInternalMoCompInfo, (PFN)DxDdGetInternalMoCompInfo}, - //{DXG_INDEX_DxDdGetMoCompBuffInfo, (PFN)DxDdGetMoCompBuffInfo}, - //{DXG_INDEX_DxDdGetMoCompGuids, (PFN)DxDdGetMoCompGuids}, - //{DXG_INDEX_DxDdGetMoCompFormats, (PFN)DxDdGetMoCompFormats}, - //{DXG_INDEX_DxDdGetScanLine, (PFN)DxDdGetScanLine}, - //{DXG_INDEX_DxDdLock, (PFN)DxDdLock}, - //{DXG_INDEX_DxDdLockD3D, (PFN)DxDdLockD3D}, - //{DXG_INDEX_DxDdQueryDirectDrawObject, (PFN)DxDdQueryDirectDrawObject}, - //{DXG_INDEX_DxDdQueryMoCompStatus, (PFN)DxDdQueryMoCompStatus}, - //{DXG_INDEX_DxDdReenableDirectDrawObject, (PFN)DxDdReenableDirectDrawObject}, - //{DXG_INDEX_DxDdReleaseDC, (PFN)DxDdReleaseDC}, - //{DXG_INDEX_DxDdRenderMoComp, (PFN)DxDdRenderMoComp}, - //{DXG_INDEX_DxDdResetVisrgn, (PFN)DxDdResetVisrgn}, - //{DXG_INDEX_DxDdSetColorKey, (PFN)DxDdSetColorKey}, - //{DXG_INDEX_DxDdSetExclusiveMode, (PFN)DxDdSetExclusiveMode}, - //{DXG_INDEX_DxDdSetGammaRamp, (PFN)DxDdSetGammaRamp}, - //{DXG_INDEX_DxDdCreateSurfaceEx, (PFN)DxDdCreateSurfaceEx}, - //{DXG_INDEX_DxDdSetOverlayPosition, (PFN)DxDdSetOverlayPosition}, - //{DXG_INDEX_DxDdUnattachSurface, (PFN)DxDdUnattachSurface}, - //{DXG_INDEX_DxDdUnlock, (PFN)DxDdUnlock}, - //{DXG_INDEX_DxDdUnlockD3D2, (PFN)DxDdUnlockD3D}, - //{DXG_INDEX_DxDdUpdateOverlay, (PFN)DxDdUpdateOverlay}, - //{DXG_INDEX_DxDdWaitForVerticalBlank, (PFN)DxDdWaitForVerticalBlank}, - //{DXG_INDEX_DxDvpCanCreateVideoPort, (PFN)DxDvpCanCreateVideoPort}, - //{DXG_INDEX_DxDvpColorControl, (PFN)DxDvpColorControl}, - //{DXG_INDEX_DxDvpCreateVideoPort, (PFN)DxDvpCreateVideoPort}, - //{DXG_INDEX_DxDvpDestroyVideoPort, (PFN)DxDvpDestroyVideoPort}, - //{DXG_INDEX_DxDvpFlipVideoPort, (PFN)DxDvpFlipVideoPort}, - //{DXG_INDEX_DxDvpGetVideoPortBandwidth, (PFN)DxDvpGetVideoPortBandwidth}, - //{DXG_INDEX_DxDvpGetVideoPortField, (PFN)DxDvpGetVideoPortField}, - //{DXG_INDEX_DxDvpGetVideoPortFlipStatus, (PFN)DxDvpGetVideoPortFlipStatus}, - //{DXG_INDEX_DxDvpGetVideoPortInputFormats, (PFN)DxDvpGetVideoPortInputFormats}, - //{DXG_INDEX_DxDvpGetVideoPortLine, (PFN)DxDvpGetVideoPortLine}, - //{DXG_INDEX_DxDvpGetVideoPortOutputFormats, (PFN)DxDvpGetVideoPortOutputFormats}, - //{DXG_INDEX_DxDvpGetVideoPortConnectInfo, (PFN)DxDvpGetVideoPortConnectInfo}, - //{DXG_INDEX_DxDvpGetVideoSignalStatus, (PFN)DxDvpGetVideoSignalStatus}, - //{DXG_INDEX_DxDvpUpdateVideoPort, (PFN)DxDvpUpdateVideoPort}, - //{DXG_INDEX_DxDvpWaitForVideoPortSync, (PFN)DxDvpWaitForVideoPortSync}, - //{DXG_INDEX_DxDvpAcquireNotification, (PFN)DxDvpAcquireNotification}, - //{DXG_INDEX_DxDvpReleaseNotification, (PFN)DxDvpReleaseNotification}, - //{DXG_INDEX_DxDdHeapVidMemAllocAligned, (PFN)DxDdHeapVidMemAllocAligned}, - //{DXG_INDEX_DxDdHeapVidMemFree, (PFN)DxDdHeapVidMemFree}, - //{DXG_INDEX_DxDdEnableDirectDraw, (PFN)DxDdEnableDirectDraw}, - //{DXG_INDEX_DxDdDisableDirectDraw, (PFN)DxDdDisableDirectDraw}, - //{DXG_INDEX_DxDdSuspendDirectDraw, (PFN)DxDdSuspendDirectDraw}, - //{DXG_INDEX_DxDdResumeDirectDraw, (PFN)DxDdResumeDirectDraw}, - //{DXG_INDEX_DxDdDynamicModeChange, (PFN)DxDdDynamicModeChange}, - //{DXG_INDEX_DxDdCloseProcess, (PFN)DxDdCloseProcess}, - //{DXG_INDEX_DxDdGetDirectDrawBound, (PFN)DxDdGetDirectDrawBound}, - //{DXG_INDEX_DxDdEnableDirectDrawRedirection, (PFN)DxDdEnableDirectDrawRedirection}, - //{DXG_INDEX_DxDdAllocPrivateUserMem, (PFN)DxDdAllocPrivateUserMem}, - //{DXG_INDEX_DxDdFreePrivateUserMem, (PFN)DxDdFreePrivateUserMem}, - {DXG_INDEX_DxDdLockDirectDrawSurface, (PFN)DxDdLockDirectDrawSurface}, - {DXG_INDEX_DxDdUnlockDirectDrawSurface, (PFN)DxDdUnlockDirectDrawSurface}, - //{DXG_INDEX_DxDdSetAccelLevel, (PFN)DxDdSetAccelLevel}, - //{DXG_INDEX_DxDdGetSurfaceLock, (PFN)DxDdGetSurfaceLock}, - //{DXG_INDEX_DxDdEnumLockedSurfaceRect, (PFN)DxDdEnumLockedSurfaceRect}, - {DXG_INDEX_DxDdIoctl, (PFN)DxDdIoctl} -}; Index: drivers/directx/dxg/dxg_int.h =================================================================== --- drivers/directx/dxg/dxg_int.h (revision 43159) +++ drivers/directx/dxg/dxg_int.h (working copy) @@ -95,6 +95,7 @@ DWORD NTAPI DxDdIoctl(ULONG ulIoctl, PVOID pBuffer, ULONG ulBufferSize); PDD_SURFACE_LOCAL NTAPI DxDdLockDirectDrawSurface(HANDLE hDdSurface); BOOL NTAPI DxDdUnlockDirectDrawSurface(PDD_SURFACE_LOCAL pSurface); +BOOL NTAPI DxDdEnableDirectDraw(PVOID arg1, BOOL arg2) ; /* Internal functions */ BOOL FASTCALL VerifyObjectOwner(PDD_ENTRY pEntry); Index: drivers/directx/dxg/eng.c =================================================================== --- drivers/directx/dxg/eng.c (revision 43159) +++ drivers/directx/dxg/eng.c (working copy) @@ -10,8 +10,9 @@ #include +#define BASEOBJECT DD_BASEOBJECT +#include - PDD_SURFACE_LOCAL NTAPI DxDdLockDirectDrawSurface(HANDLE hDdSurface) @@ -45,10 +46,19 @@ return retVal; } +BOOL +NTAPI +DxDdEnableDirectDraw(PVOID arg1, BOOL arg2/*What for?*/) +{ + PDEV_WIN32K pdev = (PDEV_WIN32K) arg1 ; + return pdev->DriverFunctions.EnableDirectDraw(pdev->dhpdev, + &pdev->EDDgpl.ddCallbacks, + &pdev->EDDgpl.ddSurfaceCallbacks, + &pdev->EDDgpl.ddPaletteCallbacks) ; +} - Index: drivers/directx/dxg/main.c =================================================================== --- drivers/directx/dxg/main.c (revision 43159) +++ drivers/directx/dxg/main.c (working copy) @@ -10,8 +10,104 @@ #include -#include "dxg_driver.h" +static DRVFN gaDxgFuncs [] = +{ + {DXG_INDEX_DxDxgGenericThunk, (PFN)DxDxgGenericThunk}, + {DXG_INDEX_DxD3dContextCreate, (PFN)NULL}, + {DXG_INDEX_DxD3dContextDestroy, (PFN)NULL}, + {DXG_INDEX_DxD3dContextDestroyAll, (PFN)NULL}, + {DXG_INDEX_DxD3dValidateTextureStageState, (PFN)NULL}, + {DXG_INDEX_DxD3dDrawPrimitives2, (PFN)NULL}, + {DXG_INDEX_DxDdGetDriverState, (PFN)NULL}, + {DXG_INDEX_DxDdAddAttachedSurface, (PFN)NULL}, + {DXG_INDEX_DxDdAlphaBlt, (PFN)NULL}, + {DXG_INDEX_DxDdAttachSurface, (PFN)NULL}, + {DXG_INDEX_DxDdBeginMoCompFrame, (PFN)NULL}, + {DXG_INDEX_DxDdBlt, (PFN)NULL}, + {DXG_INDEX_DxDdCanCreateSurface, (PFN)NULL}, + {DXG_INDEX_DxDdCanCreateD3DBuffer, (PFN)NULL}, + {DXG_INDEX_DxDdColorControl, (PFN)NULL}, + {DXG_INDEX_DxDdCreateDirectDrawObject, (PFN)NULL}, + {DXG_INDEX_DxDdCreateSurface, (PFN)NULL}, + {DXG_INDEX_DxDdCreateD3DBuffer, (PFN)NULL}, + {DXG_INDEX_DxDdCreateMoComp, (PFN)NULL}, + {DXG_INDEX_DxDdCreateSurfaceObject, (PFN)NULL}, + {DXG_INDEX_DxDdDeleteDirectDrawObject, (PFN)NULL}, + {DXG_INDEX_DxDdDeleteSurfaceObject, (PFN)NULL}, + {DXG_INDEX_DxDdDestroyMoComp, (PFN)NULL}, + {DXG_INDEX_DxDdDestroySurface, (PFN)NULL}, + {DXG_INDEX_DxDdDestroyD3DBuffer, (PFN)NULL}, + {DXG_INDEX_DxDdEndMoCompFrame, (PFN)NULL}, + {DXG_INDEX_DxDdFlip, (PFN)NULL}, + {DXG_INDEX_DxDdFlipToGDISurface, (PFN)NULL}, + {DXG_INDEX_DxDdGetAvailDriverMemory, (PFN)NULL}, + {DXG_INDEX_DxDdGetBltStatus, (PFN)NULL}, + {DXG_INDEX_DxDdGetDC, (PFN)NULL}, + {DXG_INDEX_DxDdGetDriverInfo, (PFN)NULL}, + {DXG_INDEX_DxDdGetDxHandle, (PFN)NULL}, + {DXG_INDEX_DxDdGetFlipStatus, (PFN)NULL}, + {DXG_INDEX_DxDdGetInternalMoCompInfo, (PFN)NULL}, + {DXG_INDEX_DxDdGetMoCompBuffInfo, (PFN)NULL}, + {DXG_INDEX_DxDdGetMoCompGuids, (PFN)NULL}, + {DXG_INDEX_DxDdGetMoCompFormats, (PFN)NULL}, + {DXG_INDEX_DxDdGetScanLine, (PFN)NULL}, + {DXG_INDEX_DxDdLock, (PFN)NULL}, + {DXG_INDEX_DxDdLockD3D, (PFN)NULL}, + {DXG_INDEX_DxDdQueryDirectDrawObject, (PFN)NULL}, + {DXG_INDEX_DxDdQueryMoCompStatus, (PFN)NULL}, + {DXG_INDEX_DxDdReenableDirectDrawObject, (PFN)NULL}, + {DXG_INDEX_DxDdReleaseDC, (PFN)NULL}, + {DXG_INDEX_DxDdRenderMoComp, (PFN)NULL}, + {DXG_INDEX_DxDdResetVisrgn, (PFN)NULL}, + {DXG_INDEX_DxDdSetColorKey, (PFN)NULL}, + {DXG_INDEX_DxDdSetExclusiveMode, (PFN)NULL}, + {DXG_INDEX_DxDdSetGammaRamp, (PFN)NULL}, + {DXG_INDEX_DxDdCreateSurfaceEx, (PFN)NULL}, + {DXG_INDEX_DxDdSetOverlayPosition, (PFN)NULL}, + {DXG_INDEX_DxDdUnattachSurface, (PFN)NULL}, + {DXG_INDEX_DxDdUnlock, (PFN)NULL}, + {DXG_INDEX_DxDdUnlockD3D, (PFN)NULL}, + {DXG_INDEX_DxDdUpdateOverlay, (PFN)NULL}, + {DXG_INDEX_DxDdWaitForVerticalBlank, (PFN)NULL}, + {DXG_INDEX_DxDvpCanCreateVideoPort, (PFN)NULL}, + {DXG_INDEX_DxDvpColorControl, (PFN)NULL}, + {DXG_INDEX_DxDvpCreateVideoPort, (PFN)NULL}, + {DXG_INDEX_DxDvpDestroyVideoPort, (PFN)NULL}, + {DXG_INDEX_DxDvpFlipVideoPort, (PFN)NULL}, + {DXG_INDEX_DxDvpGetVideoPortBandwidth, (PFN)NULL}, + {DXG_INDEX_DxDvpGetVideoPortField, (PFN)NULL}, + {DXG_INDEX_DxDvpGetVideoPortFlipStatus, (PFN)NULL}, + {DXG_INDEX_DxDvpGetVideoPortInputFormats, (PFN)NULL}, + {DXG_INDEX_DxDvpGetVideoPortLine, (PFN)NULL}, + {DXG_INDEX_DxDvpGetVideoPortOutputFormats, (PFN)NULL}, + {DXG_INDEX_DxDvpGetVideoPortConnectInfo, (PFN)NULL}, + {DXG_INDEX_DxDvpGetVideoSignalStatus, (PFN)NULL}, + {DXG_INDEX_DxDvpUpdateVideoPort, (PFN)NULL}, + {DXG_INDEX_DxDvpWaitForVideoPortSync, (PFN)NULL}, + {DXG_INDEX_DxDvpAcquireNotification, (PFN)NULL}, + {DXG_INDEX_DxDvpReleaseNotification, (PFN)NULL}, + {DXG_INDEX_DxDdHeapVidMemAllocAligned, (PFN)NULL}, + {DXG_INDEX_DxDdHeapVidMemFree, (PFN)NULL}, + {DXG_INDEX_DxDdEnableDirectDraw, (PFN)DxDdEnableDirectDraw}, + {DXG_INDEX_DxDdDisableDirectDraw, (PFN)NULL}, + {DXG_INDEX_DxDdSuspendDirectDraw, (PFN)NULL}, + {DXG_INDEX_DxDdResumeDirectDraw, (PFN)NULL}, + {DXG_INDEX_DxDdDynamicModeChange, (PFN)NULL}, + {DXG_INDEX_DxDdCloseProcess, (PFN)NULL}, + {DXG_INDEX_DxDdGetDirectDrawBound, (PFN)NULL}, + {DXG_INDEX_DxDdEnableDirectDrawRedirection, (PFN)NULL}, + {DXG_INDEX_DxDdAllocPrivateUserMem, (PFN)NULL}, + {DXG_INDEX_DxDdFreePrivateUserMem, (PFN)NULL}, + {DXG_INDEX_DxDdLockDirectDrawSurface, (PFN)DxDdLockDirectDrawSurface}, + {DXG_INDEX_DxDdUnlockDirectDrawSurface, (PFN)DxDdUnlockDirectDrawSurface}, + {DXG_INDEX_DxDdSetAccelLevel, (PFN)NULL}, + {DXG_INDEX_DxDdGetSurfaceLock, (PFN)NULL}, + {DXG_INDEX_DxDdEnumLockedSurfaceRect, (PFN)NULL}, + {DXG_INDEX_DxDdIoctl, (PFN)DxDdIoctl} + +}; + LONG gcDummyPageRefCnt = 0; HSEMAPHORE ghsemDummyPage = NULL; VOID *gpDummyPage = NULL; Index: include/reactos/win32k/pdevw32k.h =================================================================== --- include/reactos/win32k/pdevw32k.h (revision 0) +++ include/reactos/win32k/pdevw32k.h (revision 0) @@ -0,0 +1,88 @@ +#ifndef PDEVW32K_H_INCLUDED +#define PDEVW32K_H_INCLUDED + +#include +#include "../drivers/directx/directxint.h" +#include "ntgdityp.h" + +#define PDEV_DISPLAY 0x00000001 /* Display device */ +#define PDEV_HARDWARE_POINTER 0x00000002 /* Supports hardware cursor */ +#define PDEV_SOFTWARE_POINTER 0x00000004 +#define PDEV_GOTFONTS 0x00000040 /* Has font driver */ +#define PDEV_PRINTER 0x00000080 +#define PDEV_ALLOCATEDBRUSHES 0x00000100 +#define PDEV_HTPAL_IS_DEVPAL 0x00000200 +#define PDEV_DISABLED 0x00000400 +#define PDEV_SYNCHRONIZE_ENABLED 0x00000800 +#define PDEV_FONTDRIVER 0x00002000 /* Font device */ +#define PDEV_GAMMARAMP_TABLE 0x00004000 +#define PDEV_UMPD 0x00008000 +#define PDEV_SHARED_DEVLOCK 0x00010000 +#define PDEV_META_DEVICE 0x00020000 +#define PDEV_DRIVER_PUNTED_CALL 0x00040000 /* Driver calls back to GDI engine */ +#define PDEV_CLONE_DEVICE 0x00080000 + +typedef struct _DEV_WIN32K +{ + BASEOBJECT BaseObject; + + struct _DEV_WIN32K * ppdevNext; + INT cPdevRefs; + INT cPdevOpenRefs; + struct _DEV_WIN32K * ppdevParent; + FLONG flFlags; // flags +// FLONG flAccelerated; + HSEMAPHORE hsemDevLock; /* Device lock. */ +// HSEMAPHORE hsemPointer; + POINTL ptlPointer; +// SIZEL szlPointer; +// SPRITESTATE SpriteState; +// HFONT hlfntDefault; +// HFONT hlfntAnsiVariable; +// HFONT hlfntAnsiFixed; + HSURF ahsurf[HS_DDI_MAX]; +// PUNICODE_STRING pusPrtDataFileName; +// PVOID pDevHTInfo; +// RFONT * prfntActive; +// RFONT * prfntInactive; +// ULONG cInactive; +// BYTE ajbo[0x5C]; +// ULONG cDirectDrawDisableLocks; +// PVOID TypeOneInfo; + PVOID pvGammaRamp; /* Gamma ramp pointer. */ +// PVOID RemoteTypeOne; +// ULONG ulHorzRes; +// ULONG ulVertRes; +// PFN_DrvSetPointerShape pfnDrvSetPointerShape; +// PFN_DrvMovePointer pfnDrvMovePointer; + PFN_DrvMovePointer pfnMovePointer; +// PFN_DrvSynchronize pfnDrvSynchronize; +// PFN_DrvSynchronizeSurface pfnDrvSynchronizeSurface; +// PFN_DrvSetPalette pfnDrvSetPalette; +// PFN_DrvNotify pfnDrvNotify; +// ULONG TagSig; +// PLDEVOBJ pldev; + DHPDEV dhpdev; /* DHPDEV for device. */ + PVOID ppalSurf; /* PEPALOBJ/PPALETTE for this device. */ + DEVINFO devinfo; + GDIINFO gdiinfo; + HSURF pSurface; /* SURFACE for this device., FIXME: PSURFACE */ +// HANDLE hSpooler; /* Handle to spooler, if spooler dev driver. */ +// PVOID pDesktopId; + EDD_DIRECTDRAW_GLOBAL EDDgpl; + PVOID pGraphicsDevice; +// POINTL ptlOrigion; + PVOID pdmwDev; /* Ptr->DEVMODEW.dmSize + dmDriverExtra == alloc size. */ +// DWORD Unknown3; + FLONG DxDd_Flags; /* DxDD active status flags. */ +// LONG devAttr; +// PVOID WatchDogContext; +// ULONG WatchDogs; + union + { + DRIVER_FUNCTIONS DriverFunctions; + PVOID apfn[INDEX_LAST]; // B8C 0x0598 + }; +} DEV_WIN32K, *PDEV_WIN32K; + +#endif // PDEVW32K_H_INCLUDED Index: subsystems/win32/win32k/include/pdevobj.h =================================================================== --- subsystems/win32/win32k/include/pdevobj.h (revision 43159) +++ subsystems/win32/win32k/include/pdevobj.h (working copy) @@ -19,6 +19,8 @@ #define PDEV_DRIVER_PUNTED_CALL 0x00040000 /* Driver calls back to GDI engine */ #define PDEV_CLONE_DEVICE 0x00080000 +#include + /* Type definitions ***********************************************************/ typedef struct _GDIPOINTER /* should stay private to ENG? No, part of PDEVOBJ aka HDEV aka PDEV. */ @@ -106,6 +108,7 @@ HSURF pSurface; /* SURFACE for this device., FIXME: PSURFACE */ // HANDLE hSpooler; /* Handle to spooler, if spooler dev driver. */ // PVOID pDesktopId; + EDD_DIRECTDRAW_GLOBAL EDDgpl; PGRAPHICS_DEVICE pGraphicsDevice; // POINTL ptlOrigion; PVOID pdmwDev; /* Ptr->DEVMODEW.dmSize + dmDriverExtra == alloc size. */ @@ -131,7 +134,6 @@ UINT SafetyRemoveLevel; /* at what level was the cursor removed? 0 for not removed */ UINT SafetyRemoveCount; - struct _EDD_DIRECTDRAW_GLOBAL * pEDDgpl; } PDEVOBJ, *PPDEVOBJ; #endif /* !__WIN32K_PDEVOBJ_H */ Index: subsystems/win32/win32k/ntddraw/ddraw.c =================================================================== --- subsystems/win32/win32k/ntddraw/ddraw.c (revision 43159) +++ subsystems/win32/win32k/ntddraw/ddraw.c (working copy) @@ -71,11 +71,11 @@ { /* CHeck see if dx have been enable or not */ - if ( pDev->pEDDgpl->pvmList == NULL) + if ( pDev->EDDgpl.pvmList == NULL) { - pDev->pEDDgpl->ddCallbacks.dwSize = sizeof(DD_CALLBACKS); - pDev->pEDDgpl->ddSurfaceCallbacks.dwSize = sizeof(DD_SURFACECALLBACKS); - pDev->pEDDgpl->ddPaletteCallbacks.dwSize = sizeof(DD_PALETTECALLBACKS); + pDev->EDDgpl.ddCallbacks.dwSize = sizeof(DD_CALLBACKS); + pDev->EDDgpl.ddSurfaceCallbacks.dwSize = sizeof(DD_SURFACECALLBACKS); + pDev->EDDgpl.ddPaletteCallbacks.dwSize = sizeof(DD_PALETTECALLBACKS); pfnDdEnableDirectDraw = (PGD_DXDDENABLEDIRECTDRAW)gpDxFuncs[DXG_INDEX_DxDdEnableDirectDraw].pfn; if (pfnDdEnableDirectDraw == NULL) @@ -88,8 +88,8 @@ /* Note it is the hdev struct it want, not the drv hPDev aka pdc->PDev */ success = pfnDdEnableDirectDraw(pDC->ppdev, TRUE); - dump_edd_directdraw_global(pDev->pEDDgpl); - dump_halinfo(&pDev->pEDDgpl->ddHalInfo); + dump_edd_directdraw_global(&pDev->EDDgpl); + dump_halinfo(&pDev->EDDgpl.ddHalInfo); } } else @@ -197,6 +197,8 @@ INT t; for (t=0;t<=DXG_INDEX_DxDdIoctl;t++) { + if(t!=lstDrvFN[t].iFunc) + DPRINT1("Function %d for index %d\n", lstDrvFN[t].iFunc, t) ; gpDxFuncs[lstDrvFN[t].iFunc].iFunc =lstDrvFN[t].iFunc; gpDxFuncs[lstDrvFN[t].iFunc].pfn =lstDrvFN[t].pfn; } @@ -232,7 +234,7 @@ /* FIXME This should be alloc for each drv and use it from each drv, not global for whole win32k */ if (intEnableReactXDriver(hdc) == FALSE) { - DPRINT1("Warning : Failed to start the directx interface from the graphic driver\n"); + DPRINT("Warning : Failed to start the directx interface from the graphic driver\n"); return DDHAL_DRIVER_NOTHANDLED; } Index: subsystems/win32/win32k/ntddraw/dxeng.c =================================================================== --- subsystems/win32/win32k/ntddraw/dxeng.c (revision 43159) +++ subsystems/win32/win32k/ntddraw/dxeng.c (working copy) @@ -322,7 +322,7 @@ break; case DxEGShDevData_eddg: DPRINT1("requested DXEGSHDEVDATA DxEGShDevData_eddg\n"); - retVal = (DWORD_PTR) PDev->pEDDgpl; + retVal = (DWORD_PTR) &PDev->EDDgpl; break; case DxEGShDevData_dd_nCount: DPRINT1("requested DXEGSHDEVDATA DxEGShDevData_dd_nCount\n"); @@ -744,7 +744,7 @@ if (pDC) { if (SetType == 1) - { + { if ( Set ) pDC->fs |= DC_FLAG_FULLSCREEN; else Index: subsystems/win32/win32k/objects/device.c =================================================================== --- subsystems/win32/win32k/objects/device.c (revision 43159) +++ subsystems/win32/win32k/objects/device.c (working copy) @@ -422,12 +422,9 @@ PrimarySurface.ppdevNext = NULL; // Fixme! We need to support more than display drvs. PrimarySurface.ppdevParent = NULL; // Always NULL if primary. PrimarySurface.pGraphicsDevice = NULL; // Fixme! - PrimarySurface.pEDDgpl = ExAllocatePoolWithTag(PagedPool, sizeof(EDD_DIRECTDRAW_GLOBAL), TAG_EDDGBL); - if (PrimarySurface.pEDDgpl) - { - RtlZeroMemory( PrimarySurface.pEDDgpl ,sizeof(EDD_DIRECTDRAW_GLOBAL)); - ret = TRUE; - } + //PrimarySurface.pEDDgpl = ExAllocatePoolWithTag(PagedPool, sizeof(EDD_DIRECTDRAW_GLOBAL), TAG_EDDGBL); + RtlZeroMemory( &PrimarySurface.EDDgpl ,sizeof(EDD_DIRECTDRAW_GLOBAL)); + ret = TRUE; goto cleanup; }