{
/* Call win32k */
return NtGdiDdAddAttachedSurface((HANDLE)Attach->lpDDSurface->hDDSurface,
- (HANDLE)Attach->lpSurfAttached->hDDSurface,
- (PDD_ADDATTACHEDSURFACEDATA)Attach);
+ (HANDLE)Attach->lpSurfAttached->hDDSurface,
+ (PDD_ADDATTACHEDSURFACEDATA)Attach);
}
/*
HANDLE Surface = 0;
/* Use the right surface */
- if (Blt->lpDDSrcSurface)
+ if (Blt->lpDDSrcSurface)
{
Surface = (HANDLE)Blt->lpDDSrcSurface->hDDSurface;
}
if (pDestroySurface->lpDDSurface->hDDSurface)
{
/* Check if we shoudl really destroy it */
- RealDestroy = !(pDestroySurface->lpDDSurface->dwFlags & DDRAWISURF_DRIVERMANAGED) ||
- !(pDestroySurface->lpDDSurface->dwFlags & DDRAWISURF_INVALID);
+ RealDestroy = !(pDestroySurface->lpDDSurface->dwFlags & DDRAWISURF_DRIVERMANAGED) ||
+ !(pDestroySurface->lpDDSurface->dwFlags & DDRAWISURF_INVALID);
- /* Call win32k */
+ /* Call win32k */
Return = NtGdiDdDestroySurface((HANDLE)pDestroySurface->lpDDSurface->hDDSurface, RealDestroy);
}
{
/* Note :
* See http://msdn2.microsoft.com/en-us/library/ms794213.aspx and
- * http://msdn2.microsoft.com/en-us/library/ms792675.aspx
+ * http://msdn2.microsoft.com/en-us/library/ms792675.aspx
*/
HANDLE hSurfaceCurrentLeft = NULL;
HANDLE hSurfaceTargetLeft = NULL;
-
+
/* Auto flip off or on */
if (Flip->dwFlags & DDFLIP_STEREO )
{
if ( (Flip->lpSurfTargLeft) &&
- (Flip->lpSurfCurrLeft))
+ (Flip->lpSurfCurrLeft))
{
/* Auto flip on */
hSurfaceTargetLeft = (HANDLE) Flip->lpSurfTargLeft->hDDSurface;
/* Call win32k */
return NtGdiDdLock((HANDLE)Lock->lpDDSurface->hDDSurface,
- (PDD_LOCKDATA)Lock,
- (HANDLE)Lock->lpDDSurface->hDC);
+ (PDD_LOCKDATA)Lock,
+ (HANDLE)Lock->lpDDSurface->hDC);
}
/*
{
/* Call win32k */
return NtGdiDdUnlock((HANDLE)Unlock->lpDDSurface->hDDSurface,
- (PDD_UNLOCKDATA)Unlock);
+ (PDD_UNLOCKDATA)Unlock);
}
/*
{
/* Call win32k */
return NtGdiDdGetBltStatus((HANDLE)GetBltStatus->lpDDSurface->hDDSurface,
- (PDD_GETBLTSTATUSDATA)GetBltStatus);
+ (PDD_GETBLTSTATUSDATA)GetBltStatus);
}
/*
{
/* Call win32k */
return NtGdiDdGetFlipStatus((HANDLE)GetFlipStatus->lpDDSurface->hDDSurface,
- (PDD_GETFLIPSTATUSDATA)GetFlipStatus);
+ (PDD_GETFLIPSTATUSDATA)GetFlipStatus);
}
/*
/* Call win32k */
return NtGdiDdUpdateOverlay((HANDLE)UpdateOverlay->lpDDDestSurface->hDDSurface,
- (HANDLE)UpdateOverlay->lpDDSrcSurface->hDDSurface,
- (PDD_UPDATEOVERLAYDATA)UpdateOverlay);
+ (HANDLE)UpdateOverlay->lpDDSrcSurface->hDDSurface,
+ (PDD_UPDATEOVERLAYDATA)UpdateOverlay);
}
/*
{
/* Call win32k */
return NtGdiDdWaitForVerticalBlank(GetDdHandle(
- WaitForVerticalBlank->lpDD->hDD),
+ WaitForVerticalBlank->lpDD->hDD),
(PDD_WAITFORVERTICALBLANKDATA)
WaitForVerticalBlank);
}
WINAPI
DdCanCreateSurface(LPDDHAL_CANCREATESURFACEDATA CanCreateSurface)
{
- /*
- * Note : This functions are basic same, in win32k
- * NtGdiDdCanCreateD3DBuffer and NtGdiDdCanCreateSurface are mergs
- * toghter in win32k at end and retrurn same data, it is still sepreated
- * at user mode but in kmode it is not.
+ /*
+ * Note : This functions are basic same, in win32k
+ * NtGdiDdCanCreateD3DBuffer and NtGdiDdCanCreateSurface are mergs
+ * toghter in win32k at end and retrurn same data, it is still sepreated
+ * at user mode but in kmode it is not.
*/
/* Call win32k */
LPDDSURFACEDESC pSurfaceDesc = NULL;
/* TODO: Optimize speed. Most games/dx apps/programs do not want one surface, they want at least two.
- * So we need increase the stack to contain two surfaces instead of one. This will increase
+ * So we need increase the stack to contain two surfaces instead of one. This will increase
* the speed of the apps when allocating buffers. How to increase the surface stack space:
* we need to create a struct for DD_SURFACE_LOCAL DdSurfaceLocal, DD_SURFACE_MORE DdSurfaceMore
* DD_SURFACE_GLOBAL DdSurfaceGlobal, HANDLE hPrevSurface, hSurface like
* struct { DD_SURFACE_LOCAL DdSurfaceLocal1, DD_SURFACE_LOCAL DdSurfaceLocal2 }
- * in a way that it may contain two surfaces, maybe even four. We need to watch what is most common before
+ * in a way that it may contain two surfaces, maybe even four. We need to watch what is most common before
* we create the size. Activate this IF when you start doing the optimze and please also
* take reports from users which value they got here.
- */
+ */
#if 1
{
- char buffer[1024]; \
+ char buffer[1024];
+ \
sprintf ( buffer, "Function %s : Optimze max to %d Surface ? (%s:%d)\n", __FUNCTION__, (int)SurfaceCount,__FILE__,__LINE__ );
OutputDebugStringA(buffer);
}
ptmpDdSurfaceLocal->ddsCaps.dwCaps = lcl->ddsCaps.dwCaps;
ptmpDdSurfaceLocal->dwFlags = (ptmpDdSurfaceLocal->dwFlags &
- (0xB0000000 | DDRAWISURF_INMASTERSPRITELIST |
- DDRAWISURF_HELCB | DDRAWISURF_FRONTBUFFER |
- DDRAWISURF_BACKBUFFER | DDRAWISURF_INVALID |
- DDRAWISURF_DCIBUSY | DDRAWISURF_DCILOCK)) |
+ (0xB0000000 | DDRAWISURF_INMASTERSPRITELIST |
+ DDRAWISURF_HELCB | DDRAWISURF_FRONTBUFFER |
+ DDRAWISURF_BACKBUFFER | DDRAWISURF_INVALID |
+ DDRAWISURF_DCIBUSY | DDRAWISURF_DCILOCK)) |
(lcl->dwFlags & DDRAWISURF_DRIVERMANAGED);
ptmpDdSurfaceGlobal->wWidth = gpl->wWidth;
sizeof(DDPIXELFORMAT));
}
- /* Note if lcl->lpSurfMore is NULL zero out
+ /* Note if lcl->lpSurfMore is NULL zero out
* ptmpDdSurfaceMore->ddsCapsEx.dwCaps2,
- * dwCaps3, dwCaps4, ptmpDdSurfaceMore->dwSurfaceHandle
+ * dwCaps3, dwCaps4, ptmpDdSurfaceMore->dwSurfaceHandle
*/
if (lcl->lpSurfMore)
{
pCreateSurface->ddRVal = DDERR_GENERIC;
Return = NtGdiDdCreateSurface(GetDdHandle(pCreateSurface->lpDD->hDD),
- (HANDLE *)phSurface,
- pSurfaceDesc,
- pDdSurfaceGlobal,
- pDdSurfaceLocal,
- pDdSurfaceMore,
- (PDD_CREATESURFACEDATA)pCreateSurface,
- puhSurface);
+ (HANDLE *)phSurface,
+ pSurfaceDesc,
+ pDdSurfaceGlobal,
+ pDdSurfaceLocal,
+ pDdSurfaceMore,
+ (PDD_CREATESURFACEDATA)pCreateSurface,
+ puhSurface);
if (SurfaceCount == 0)
{
ptmpDdSurfaceGlobal = pDdSurfaceGlobal;
ptmpDdSurfaceLocal = pDdSurfaceLocal;
- for (i=0;i<SurfaceCount;i++)
+ for (i=0; i<SurfaceCount; i++)
{
LPDDRAWI_DDRAWSURFACE_LCL lcl = pCreateSurface->lplpSList[i];
LPDDRAWI_DDRAWSURFACE_GBL gpl = pCreateSurface->lplpSList[i]->lpGbl;
{
/* Call win32k */
return NtGdiDdSetColorKey((HANDLE)pSetColorKey->lpDDSurface->hDDSurface,
- (PDD_SETCOLORKEYDATA)pSetColorKey);
+ (PDD_SETCOLORKEYDATA)pSetColorKey);
}
/*
{
/* Call win32k */
return NtGdiDdGetScanLine(GetDdHandle(pGetScanLine->lpDD->hDD),
- (PDD_GETSCANLINEDATA)pGetScanLine);
+ (PDD_GETSCANLINEDATA)pGetScanLine);
}
BOOL
WINAPI
DvpCreateVideoPort(LPDDHAL_CREATEVPORTDATA pDvdCreatePort)
-{
- pDvdCreatePort->lpVideoPort->hDDVideoPort =
- NtGdiDvpCreateVideoPort(GetDdHandle(pDvdCreatePort->lpDD->lpGbl->hDD),
- (PDD_CREATEVPORTDATA) pDvdCreatePort);
-
+{
+ pDvdCreatePort->lpVideoPort->hDDVideoPort =
+ NtGdiDvpCreateVideoPort(GetDdHandle(pDvdCreatePort->lpDD->lpGbl->hDD),
+ (PDD_CREATEVPORTDATA) pDvdCreatePort);
+
return TRUE;
}
WINAPI
DvpDestroyVideoPort(LPDDHAL_DESTROYVPORTDATA pDvdDestoryPort)
{
- return NtGdiDvpDestroyVideoPort(pDvdDestoryPort->lpVideoPort->hDDVideoPort, (PDD_DESTROYVPORTDATA)pDvdDestoryPort);
+ return NtGdiDvpDestroyVideoPort(pDvdDestoryPort->lpVideoPort->hDDVideoPort, (PDD_DESTROYVPORTDATA)pDvdDestoryPort);
}
/*
DvpUpdateVideoPort(LPDDHAL_UPDATEVPORTDATA pDvdUpdateVideoPort)
{
/*
- * Windows XP limit to max 10 handles of videoport surface and Vbi
- * ReactOS doing same to keep compatible, if it is more that 10
+ * Windows XP limit to max 10 handles of videoport surface and Vbi
+ * ReactOS doing same to keep compatible, if it is more that 10
* videoport surface or vbi the stack will be curpted in windows xp
* ReactOS safe guard againts that
*
HANDLE phSurfaceVideo[10];
HANDLE phSurfaceVbi[10];
-
+
if (pDvdUpdateVideoPort->dwFlags != DDRAWI_VPORTSTOP)
{
DWORD dwNumAutoflip;
/* Take copy of lplpDDSurface for the handle value will be modify in dxg */
dwNumAutoflip = pDvdUpdateVideoPort->dwNumAutoflip;
if ((dwNumAutoflip == 0) &&
- (pDvdUpdateVideoPort->lplpDDSurface == 0))
- {
- dwNumAutoflip++;
+ (pDvdUpdateVideoPort->lplpDDSurface == 0))
+ {
+ dwNumAutoflip++;
}
-
+
if (dwNumAutoflip != 0)
- {
+ {
if (dwNumAutoflip>10)
{
dwNumAutoflip = 10;
}
- memcpy(phSurfaceVideo,pDvdUpdateVideoPort->lplpDDSurface,dwNumAutoflip*sizeof(HANDLE));
+ memcpy(phSurfaceVideo,pDvdUpdateVideoPort->lplpDDSurface,dwNumAutoflip*sizeof(HANDLE));
}
-
+
/* Take copy of lplpDDVBISurface for the handle value will be modify in dxg */
- dwNumVBIAutoflip = pDvdUpdateVideoPort->dwNumVBIAutoflip;
+ dwNumVBIAutoflip = pDvdUpdateVideoPort->dwNumVBIAutoflip;
if ( (dwNumVBIAutoflip == 0) &&
- (pDvdUpdateVideoPort->lplpDDVBISurface == 0) )
+ (pDvdUpdateVideoPort->lplpDDVBISurface == 0) )
{
dwNumVBIAutoflip++;
}
-
+
if (dwNumVBIAutoflip != 0)
{
if (dwNumVBIAutoflip>10)
dwNumVBIAutoflip = 10;
}
memcpy(phSurfaceVbi,pDvdUpdateVideoPort->lplpDDVBISurface,dwNumVBIAutoflip*sizeof(HANDLE));
- }
+ }
}
/* Call Win32k */
WINAPI
DdGetAvailDriverMemory(LPDDHAL_GETAVAILDRIVERMEMORYDATA pDdGetAvailDriverMemory)
{
- return NtGdiDdGetAvailDriverMemory(GetDdHandle( pDdGetAvailDriverMemory->lpDD->hDD), (PDD_GETAVAILDRIVERMEMORYDATA) pDdGetAvailDriverMemory);
+ return NtGdiDdGetAvailDriverMemory(GetDdHandle( pDdGetAvailDriverMemory->lpDD->hDD), (PDD_GETAVAILDRIVERMEMORYDATA) pDdGetAvailDriverMemory);
}
/*
WINAPI
DdAlphaBlt(LPDDHAL_BLTDATA pDdAlphaBlt)
{
- HANDLE hDDSrcSurface = 0;
+ HANDLE hDDSrcSurface = 0;
if (pDdAlphaBlt->lpDDSrcSurface != 0)
{
hDDSrcSurface = (HANDLE) pDdAlphaBlt->lpDDSrcSurface->hDDSurface;
}
-
+
return NtGdiDdAlphaBlt((HANDLE)pDdAlphaBlt->lpDDDestSurface->hDDSurface, hDDSrcSurface, (PDD_BLTDATA)&pDdAlphaBlt);
}
DdCreateSurfaceEx(LPDDHAL_CREATESURFACEEXDATA pDdCreateSurfaceEx)
{
pDdCreateSurfaceEx->ddRVal = NtGdiDdCreateSurfaceEx( GetDdHandle(pDdCreateSurfaceEx->lpDDLcl->lpGbl->hDD),
- (HANDLE)pDdCreateSurfaceEx->lpDDSLcl->hDDSurface,
- pDdCreateSurfaceEx->lpDDSLcl->lpSurfMore->dwSurfaceHandle);
+ (HANDLE)pDdCreateSurfaceEx->lpDDSLcl->hDDSurface,
+ pDdCreateSurfaceEx->lpDDSLcl->lpSurfMore->dwSurfaceHandle);
return TRUE;
}
DWORD
WINAPI
DdGetDriverInfo(LPDDHAL_GETDRIVERINFODATA pData)
-{
+{
DDHAL_GETDRIVERINFODATA pDrvInfoData;
DWORD retValue = DDHAL_DRIVER_NOTHANDLED;
HANDLE hDD;
/* FIXME add SEH around this functions */
- RtlZeroMemory(&pDrvInfoData, sizeof (DDHAL_GETDRIVERINFODATA));
- RtlCopyMemory(&pDrvInfoData.guidInfo, &pData->guidInfo, sizeof(GUID));
-
- hDD = GetDdHandle(pData->dwContext);
-
- pDrvInfoData.dwSize = sizeof (DDHAL_GETDRIVERINFODATA);
- pDrvInfoData.ddRVal = DDERR_GENERIC;
- pDrvInfoData.dwContext = (ULONG_PTR)hDD;
-
-
- /* Videoport Callbacks check and setup for DirectX/ ReactX */
- if (IsEqualGUID(&pData->guidInfo, &GUID_VideoPortCallbacks))
- {
- DDHAL_DDVIDEOPORTCALLBACKS pDvdPort;
- DDHAL_DDVIDEOPORTCALLBACKS* pUserDvdPort = (DDHAL_DDVIDEOPORTCALLBACKS *)pData->lpvData;
-
- /* Clear internal out buffer and set it up*/
- RtlZeroMemory(&pDvdPort, DDVIDEOPORTCALLBACKSSIZE);
- pDvdPort.dwSize = DDVIDEOPORTCALLBACKSSIZE;
-
- /* set up internal buffer */
- pDrvInfoData.lpvData = (PVOID)&pDvdPort;
- pDrvInfoData.dwExpectedSize = DDVIDEOPORTCALLBACKSSIZE ;
-
- /* Call win32k */
- retValue = NtGdiDdGetDriverInfo(hDD, (PDD_GETDRIVERINFODATA)&pDrvInfoData);
-
- /* Setup user out buffer and convert kmode callbacks to user mode */
- pUserDvdPort->dwSize = DDVIDEOPORTCALLBACKSSIZE;
- pUserDvdPort->dwFlags = pDrvInfoData.dwFlags = 0;
-
- pUserDvdPort->dwFlags = (pDrvInfoData.dwFlags & ~(DDHAL_VPORT32_CREATEVIDEOPORT | DDHAL_VPORT32_FLIP |
- DDHAL_VPORT32_DESTROY | DDHAL_VPORT32_UPDATE | DDHAL_VPORT32_WAITFORSYNC)) |
- (DDHAL_VPORT32_CREATEVIDEOPORT | DDHAL_VPORT32_FLIP |
- DDHAL_VPORT32_DESTROY | DDHAL_VPORT32_UPDATE);
-
- pData->dwActualSize = DDVIDEOPORTCALLBACKSSIZE;
- pUserDvdPort->CreateVideoPort = (LPDDHALVPORTCB_CREATEVIDEOPORT) DvpCreateVideoPort;
- pUserDvdPort->FlipVideoPort = (LPDDHALVPORTCB_FLIP) DvpFlipVideoPort;
- pUserDvdPort->DestroyVideoPort = (LPDDHALVPORTCB_DESTROYVPORT) DvpDestroyVideoPort;
- pUserDvdPort->UpdateVideoPort = (LPDDHALVPORTCB_UPDATE) DvpUpdateVideoPort;
-
- if (pDvdPort.CanCreateVideoPort)
- {
- pUserDvdPort->CanCreateVideoPort = (LPDDHALVPORTCB_CANCREATEVIDEOPORT) DvpCanCreateVideoPort;
- }
+ RtlZeroMemory(&pDrvInfoData, sizeof (DDHAL_GETDRIVERINFODATA));
+ RtlCopyMemory(&pDrvInfoData.guidInfo, &pData->guidInfo, sizeof(GUID));
- if (pDvdPort.GetVideoPortBandwidth)
- {
- pUserDvdPort->GetVideoPortBandwidth = (LPDDHALVPORTCB_GETBANDWIDTH) DvpGetVideoPortBandwidth;
- }
+ hDD = GetDdHandle(pData->dwContext);
- if (pDvdPort.GetVideoPortInputFormats)
- {
- pUserDvdPort->GetVideoPortInputFormats = (LPDDHALVPORTCB_GETINPUTFORMATS) DvpGetVideoPortInputFormats;
- }
+ pDrvInfoData.dwSize = sizeof (DDHAL_GETDRIVERINFODATA);
+ pDrvInfoData.ddRVal = DDERR_GENERIC;
+ pDrvInfoData.dwContext = (ULONG_PTR)hDD;
- if (pDvdPort.GetVideoPortOutputFormats)
- {
- pUserDvdPort->GetVideoPortOutputFormats = (LPDDHALVPORTCB_GETOUTPUTFORMATS) DvpGetVideoPortOutputFormats;
- }
- if (pDvdPort.GetVideoPortField)
- {
- pUserDvdPort->GetVideoPortField = (LPDDHALVPORTCB_GETFIELD) DvpGetVideoPortField;
- }
+ /* Videoport Callbacks check and setup for DirectX/ ReactX */
+ if (IsEqualGUID(&pData->guidInfo, &GUID_VideoPortCallbacks))
+ {
+ DDHAL_DDVIDEOPORTCALLBACKS pDvdPort;
+ DDHAL_DDVIDEOPORTCALLBACKS* pUserDvdPort = (DDHAL_DDVIDEOPORTCALLBACKS *)pData->lpvData;
- if (pDvdPort.GetVideoPortLine)
- {
- pUserDvdPort->GetVideoPortLine = (LPDDHALVPORTCB_GETLINE) DvpGetVideoPortLine;
- }
+ /* Clear internal out buffer and set it up*/
+ RtlZeroMemory(&pDvdPort, DDVIDEOPORTCALLBACKSSIZE);
+ pDvdPort.dwSize = DDVIDEOPORTCALLBACKSSIZE;
- if (pDvdPort.GetVideoPortConnectInfo)
- {
- pUserDvdPort->GetVideoPortConnectInfo = (LPDDHALVPORTCB_GETVPORTCONNECT) DvpGetVideoPortConnectInfo;
- }
+ /* set up internal buffer */
+ pDrvInfoData.lpvData = (PVOID)&pDvdPort;
+ pDrvInfoData.dwExpectedSize = DDVIDEOPORTCALLBACKSSIZE ;
- if (pDvdPort.GetVideoPortFlipStatus)
- {
- pUserDvdPort->GetVideoPortFlipStatus = (LPDDHALVPORTCB_GETFLIPSTATUS) DvpGetVideoPortFlipStatus;
- }
-
- if (pDvdPort.WaitForVideoPortSync)
- {
- pUserDvdPort->WaitForVideoPortSync = (LPDDHALVPORTCB_WAITFORSYNC) DvpWaitForVideoPortSync;
- }
+ /* Call win32k */
+ retValue = NtGdiDdGetDriverInfo(hDD, (PDD_GETDRIVERINFODATA)&pDrvInfoData);
- if (pDvdPort.GetVideoSignalStatus)
- {
- pUserDvdPort->GetVideoSignalStatus = (LPDDHALVPORTCB_GETSIGNALSTATUS) DvpGetVideoSignalStatus;
- }
+ /* Setup user out buffer and convert kmode callbacks to user mode */
+ pUserDvdPort->dwSize = DDVIDEOPORTCALLBACKSSIZE;
+ pUserDvdPort->dwFlags = pDrvInfoData.dwFlags = 0;
- if (pDvdPort.ColorControl)
- {
- pUserDvdPort->ColorControl = (LPDDHALVPORTCB_COLORCONTROL) DvpColorControl;
- }
+ pUserDvdPort->dwFlags = (pDrvInfoData.dwFlags & ~(DDHAL_VPORT32_CREATEVIDEOPORT | DDHAL_VPORT32_FLIP |
+ DDHAL_VPORT32_DESTROY | DDHAL_VPORT32_UPDATE | DDHAL_VPORT32_WAITFORSYNC)) |
+ (DDHAL_VPORT32_CREATEVIDEOPORT | DDHAL_VPORT32_FLIP |
+ DDHAL_VPORT32_DESTROY | DDHAL_VPORT32_UPDATE);
- /* Windows XP never repot back the true return value,
- * it only report back if we have a driver or not
- * ReactOS keep this behoir to be compatible with
- * Windows XP
- */
- pData->ddRVal = retValue;
+ pData->dwActualSize = DDVIDEOPORTCALLBACKSSIZE;
+ pUserDvdPort->CreateVideoPort = (LPDDHALVPORTCB_CREATEVIDEOPORT) DvpCreateVideoPort;
+ pUserDvdPort->FlipVideoPort = (LPDDHALVPORTCB_FLIP) DvpFlipVideoPort;
+ pUserDvdPort->DestroyVideoPort = (LPDDHALVPORTCB_DESTROYVPORT) DvpDestroyVideoPort;
+ pUserDvdPort->UpdateVideoPort = (LPDDHALVPORTCB_UPDATE) DvpUpdateVideoPort;
+
+ if (pDvdPort.CanCreateVideoPort)
+ {
+ pUserDvdPort->CanCreateVideoPort = (LPDDHALVPORTCB_CANCREATEVIDEOPORT) DvpCanCreateVideoPort;
}
- /* Color Control Callbacks check and setup for DirectX/ ReactX */
- if (IsEqualGUID(&pData->guidInfo, &GUID_ColorControlCallbacks))
+ if (pDvdPort.GetVideoPortBandwidth)
{
- DDHAL_DDCOLORCONTROLCALLBACKS pColorControl;
- DDHAL_DDCOLORCONTROLCALLBACKS* pUserColorControl = (DDHAL_DDCOLORCONTROLCALLBACKS *)pData->lpvData;
-
- /* Clear internal out buffer and set it up*/
- RtlZeroMemory(&pColorControl, DDCOLORCONTROLCALLBACKSSIZE);
- pColorControl.dwSize = DDCOLORCONTROLCALLBACKSSIZE;
+ pUserDvdPort->GetVideoPortBandwidth = (LPDDHALVPORTCB_GETBANDWIDTH) DvpGetVideoPortBandwidth;
+ }
- /* set up internal buffer */
- pDrvInfoData.lpvData = (PVOID)&pColorControl;
- pDrvInfoData.dwExpectedSize = DDCOLORCONTROLCALLBACKSSIZE ;
+ if (pDvdPort.GetVideoPortInputFormats)
+ {
+ pUserDvdPort->GetVideoPortInputFormats = (LPDDHALVPORTCB_GETINPUTFORMATS) DvpGetVideoPortInputFormats;
+ }
- /* Call win32k */
- retValue = NtGdiDdGetDriverInfo(hDD, (PDD_GETDRIVERINFODATA)&pDrvInfoData);
+ if (pDvdPort.GetVideoPortOutputFormats)
+ {
+ pUserDvdPort->GetVideoPortOutputFormats = (LPDDHALVPORTCB_GETOUTPUTFORMATS) DvpGetVideoPortOutputFormats;
+ }
- pData->dwActualSize = DDCOLORCONTROLCALLBACKSSIZE;
- pData->dwFlags = pDrvInfoData.dwFlags;
+ if (pDvdPort.GetVideoPortField)
+ {
+ pUserDvdPort->GetVideoPortField = (LPDDHALVPORTCB_GETFIELD) DvpGetVideoPortField;
+ }
- pUserColorControl->dwSize = DDCOLORCONTROLCALLBACKSSIZE;
- pUserColorControl->dwFlags = pUserColorControl->dwFlags;
+ if (pDvdPort.GetVideoPortLine)
+ {
+ pUserDvdPort->GetVideoPortLine = (LPDDHALVPORTCB_GETLINE) DvpGetVideoPortLine;
+ }
- if (pColorControl.ColorControl != NULL)
- {
- pUserColorControl->ColorControl = (LPDDHALCOLORCB_COLORCONTROL) DdColorControl;
- }
+ if (pDvdPort.GetVideoPortConnectInfo)
+ {
+ pUserDvdPort->GetVideoPortConnectInfo = (LPDDHALVPORTCB_GETVPORTCONNECT) DvpGetVideoPortConnectInfo;
+ }
- /* Windows XP never repot back the true return value,
- * it only report back if we have a driver or not
- * ReactOS keep this behoir to be compatible with
- * Windows XP
- */
- pData->ddRVal = retValue;
+ if (pDvdPort.GetVideoPortFlipStatus)
+ {
+ pUserDvdPort->GetVideoPortFlipStatus = (LPDDHALVPORTCB_GETFLIPSTATUS) DvpGetVideoPortFlipStatus;
}
- /* Misc Callbacks check and setup for DirectX/ ReactX */
- else if (IsEqualGUID(&pData->guidInfo, &GUID_MiscellaneousCallbacks))
+ if (pDvdPort.WaitForVideoPortSync)
{
- DDHAL_DDMISCELLANEOUSCALLBACKS pMisc;
- DDHAL_DDMISCELLANEOUSCALLBACKS* pUserMisc = (DDHAL_DDMISCELLANEOUSCALLBACKS *)pData->lpvData;
+ pUserDvdPort->WaitForVideoPortSync = (LPDDHALVPORTCB_WAITFORSYNC) DvpWaitForVideoPortSync;
+ }
- /* Clear internal out buffer and set it up*/
- RtlZeroMemory(&pMisc, DDMISCELLANEOUSCALLBACKSSIZE);
- pMisc.dwSize = DDMISCELLANEOUSCALLBACKSSIZE;
+ if (pDvdPort.GetVideoSignalStatus)
+ {
+ pUserDvdPort->GetVideoSignalStatus = (LPDDHALVPORTCB_GETSIGNALSTATUS) DvpGetVideoSignalStatus;
+ }
- /* set up internal buffer */
- pDrvInfoData.lpvData = (PVOID)&pMisc;
- pDrvInfoData.dwExpectedSize = DDMISCELLANEOUSCALLBACKSSIZE ;
+ if (pDvdPort.ColorControl)
+ {
+ pUserDvdPort->ColorControl = (LPDDHALVPORTCB_COLORCONTROL) DvpColorControl;
+ }
- /* Call win32k */
- retValue = NtGdiDdGetDriverInfo(hDD, (PDD_GETDRIVERINFODATA)&pDrvInfoData);
+ /* Windows XP never repot back the true return value,
+ * it only report back if we have a driver or not
+ * ReactOS keep this behoir to be compatible with
+ * Windows XP
+ */
+ pData->ddRVal = retValue;
+ }
- pData->dwActualSize = DDMISCELLANEOUSCALLBACKSSIZE;
+ /* Color Control Callbacks check and setup for DirectX/ ReactX */
+ if (IsEqualGUID(&pData->guidInfo, &GUID_ColorControlCallbacks))
+ {
+ DDHAL_DDCOLORCONTROLCALLBACKS pColorControl;
+ DDHAL_DDCOLORCONTROLCALLBACKS* pUserColorControl = (DDHAL_DDCOLORCONTROLCALLBACKS *)pData->lpvData;
- /* Only one callbacks are supported */
- pUserMisc->dwFlags = pMisc.dwFlags & DDHAL_MISCCB32_GETAVAILDRIVERMEMORY;
- pUserMisc->GetAvailDriverMemory = (LPDDHAL_GETAVAILDRIVERMEMORY) DdGetAvailDriverMemory;
+ /* Clear internal out buffer and set it up*/
+ RtlZeroMemory(&pColorControl, DDCOLORCONTROLCALLBACKSSIZE);
+ pColorControl.dwSize = DDCOLORCONTROLCALLBACKSSIZE;
- /* This callbacks are only for win9x and theirfor it is not longer use in NT or ReactOS
- * pUserMisc->UpdateNonLocalHeap;
- * pUserMisc->GetHeapAlignment;
- * pUserMisc->GetSysmemBltStatus; */
+ /* set up internal buffer */
+ pDrvInfoData.lpvData = (PVOID)&pColorControl;
+ pDrvInfoData.dwExpectedSize = DDCOLORCONTROLCALLBACKSSIZE ;
- /* Windows XP never repot back the true return value,
- * it only report back if we have a driver or not
- * ReactOS keep this behoir to be compatible with
- * Windows XP
- */
- pData->ddRVal = retValue;
- }
+ /* Call win32k */
+ retValue = NtGdiDdGetDriverInfo(hDD, (PDD_GETDRIVERINFODATA)&pDrvInfoData);
+
+ pData->dwActualSize = DDCOLORCONTROLCALLBACKSSIZE;
+ pData->dwFlags = pDrvInfoData.dwFlags;
- /* Misc 2 Callbacks check and setup for DirectX/ ReactX */
- else if (IsEqualGUID(&pData->guidInfo, &GUID_Miscellaneous2Callbacks))
+ pUserColorControl->dwSize = DDCOLORCONTROLCALLBACKSSIZE;
+ pUserColorControl->dwFlags = pUserColorControl->dwFlags;
+
+ if (pColorControl.ColorControl != NULL)
{
- DDHAL_DDMISCELLANEOUS2CALLBACKS pMisc;
- DDHAL_DDMISCELLANEOUS2CALLBACKS* pUserMisc = (DDHAL_DDMISCELLANEOUS2CALLBACKS *)pData->lpvData;
-
- /* Clear internal out buffer and set it up*/
- RtlZeroMemory(&pMisc, DDMISCELLANEOUS2CALLBACKSSIZE);
- pMisc.dwSize = DDMISCELLANEOUS2CALLBACKSSIZE;
-
- /* set up internal buffer */
- pDrvInfoData.lpvData = (PVOID)&pMisc;
- pDrvInfoData.dwExpectedSize = DDMISCELLANEOUS2CALLBACKSSIZE ;
-
- /* Call win32k */
- retValue = NtGdiDdGetDriverInfo(hDD, (PDD_GETDRIVERINFODATA)&pDrvInfoData);
-
- pData->dwActualSize = DDMISCELLANEOUS2CALLBACKSSIZE;
-
- pUserMisc->dwFlags = pMisc.dwFlags;
-
- /* This functions are not documneted in MSDN for this struct, here is directx/reactx alpha blend */
- if ( pMisc.Reserved )
- {
- pUserMisc->Reserved = (LPVOID) DdAlphaBlt;
- }
+ pUserColorControl->ColorControl = (LPDDHALCOLORCB_COLORCONTROL) DdColorControl;
+ }
- if ( pMisc.CreateSurfaceEx )
- {
- pUserMisc->CreateSurfaceEx = (LPDDHAL_CREATESURFACEEX) DdCreateSurfaceEx;
- }
+ /* Windows XP never repot back the true return value,
+ * it only report back if we have a driver or not
+ * ReactOS keep this behoir to be compatible with
+ * Windows XP
+ */
+ pData->ddRVal = retValue;
+ }
- if ( pMisc.GetDriverState )
- {
- pUserMisc->GetDriverState = (LPDDHAL_GETDRIVERSTATE) NtGdiDdGetDriverState;
- }
+ /* Misc Callbacks check and setup for DirectX/ ReactX */
+ else if (IsEqualGUID(&pData->guidInfo, &GUID_MiscellaneousCallbacks))
+ {
+ DDHAL_DDMISCELLANEOUSCALLBACKS pMisc;
+ DDHAL_DDMISCELLANEOUSCALLBACKS* pUserMisc = (DDHAL_DDMISCELLANEOUSCALLBACKS *)pData->lpvData;
- /* NOTE : pUserMisc->DestroyDDLocal is outdated and are not beign tuch */
+ /* Clear internal out buffer and set it up*/
+ RtlZeroMemory(&pMisc, DDMISCELLANEOUSCALLBACKSSIZE);
+ pMisc.dwSize = DDMISCELLANEOUSCALLBACKSSIZE;
- /* Windows XP never repot back the true return value,
- * it only report back if we have a driver or not
- * ReactOS keep this behoir to be compatible with
- * Windows XP
- */
- pData->ddRVal = retValue;
- }
+ /* set up internal buffer */
+ pDrvInfoData.lpvData = (PVOID)&pMisc;
+ pDrvInfoData.dwExpectedSize = DDMISCELLANEOUSCALLBACKSSIZE ;
- /* NT Callbacks check and setup for DirectX/ ReactX */
- else if (IsEqualGUID(&pData->guidInfo, &GUID_NTCallbacks))
- {
- /* MS does not have DHAL_* version of this callbacks
- * so we are force using PDD_* callbacks here
- */
- DD_NTCALLBACKS pNtKernel;
- PDD_NTCALLBACKS pUserNtKernel = (PDD_NTCALLBACKS)pData->lpvData;
-
- /* Clear internal out buffer and set it up*/
- RtlZeroMemory(&pNtKernel, sizeof(DD_NTCALLBACKS));
- pNtKernel.dwSize = sizeof(DD_NTCALLBACKS);
-
- /* set up internal buffer */
- pDrvInfoData.lpvData = (PVOID)&pNtKernel;
- pDrvInfoData.dwExpectedSize = sizeof(DD_NTCALLBACKS) ;
-
- /* Call win32k */
- retValue = NtGdiDdGetDriverInfo(hDD, (PDD_GETDRIVERINFODATA)&pDrvInfoData);
-
- pData->dwActualSize = sizeof(DD_NTCALLBACKS);
-
- pUserNtKernel->dwSize = sizeof(DD_NTCALLBACKS);
- pUserNtKernel->dwFlags = pNtKernel.dwFlags;
- pUserNtKernel->FreeDriverMemory = 0;
-
- if (pNtKernel.SetExclusiveMode)
- {
- pUserNtKernel->SetExclusiveMode = (PDD_SETEXCLUSIVEMODE) DdSetExclusiveMode;
- }
+ /* Call win32k */
+ retValue = NtGdiDdGetDriverInfo(hDD, (PDD_GETDRIVERINFODATA)&pDrvInfoData);
- if (pNtKernel.FlipToGDISurface)
- {
- pUserNtKernel->FlipToGDISurface = (PDD_FLIPTOGDISURFACE) DdFlipToGDISurface;
- }
+ pData->dwActualSize = DDMISCELLANEOUSCALLBACKSSIZE;
- /* Windows XP never repot back the true return value,
- * it only report back if we have a driver or not
- * ReactOS keep this behoir to be compatible with
- * Windows XP
- */
- pData->ddRVal = retValue;
- }
+ /* Only one callbacks are supported */
+ pUserMisc->dwFlags = pMisc.dwFlags & DDHAL_MISCCB32_GETAVAILDRIVERMEMORY;
+ pUserMisc->GetAvailDriverMemory = (LPDDHAL_GETAVAILDRIVERMEMORY) DdGetAvailDriverMemory;
+
+ /* This callbacks are only for win9x and theirfor it is not longer use in NT or ReactOS
+ * pUserMisc->UpdateNonLocalHeap;
+ * pUserMisc->GetHeapAlignment;
+ * pUserMisc->GetSysmemBltStatus; */
+
+ /* Windows XP never repot back the true return value,
+ * it only report back if we have a driver or not
+ * ReactOS keep this behoir to be compatible with
+ * Windows XP
+ */
+ pData->ddRVal = retValue;
+ }
+
+ /* Misc 2 Callbacks check and setup for DirectX/ ReactX */
+ else if (IsEqualGUID(&pData->guidInfo, &GUID_Miscellaneous2Callbacks))
+ {
+ DDHAL_DDMISCELLANEOUS2CALLBACKS pMisc;
+ DDHAL_DDMISCELLANEOUS2CALLBACKS* pUserMisc = (DDHAL_DDMISCELLANEOUS2CALLBACKS *)pData->lpvData;
+
+ /* Clear internal out buffer and set it up*/
+ RtlZeroMemory(&pMisc, DDMISCELLANEOUS2CALLBACKSSIZE);
+ pMisc.dwSize = DDMISCELLANEOUS2CALLBACKSSIZE;
+
+ /* set up internal buffer */
+ pDrvInfoData.lpvData = (PVOID)&pMisc;
+ pDrvInfoData.dwExpectedSize = DDMISCELLANEOUS2CALLBACKSSIZE ;
- /* D3D Callbacks version 2 check and setup for DirectX/ ReactX */
- else if (IsEqualGUID(&pData->guidInfo, &GUID_D3DCallbacks2))
+ /* Call win32k */
+ retValue = NtGdiDdGetDriverInfo(hDD, (PDD_GETDRIVERINFODATA)&pDrvInfoData);
+
+ pData->dwActualSize = DDMISCELLANEOUS2CALLBACKSSIZE;
+
+ pUserMisc->dwFlags = pMisc.dwFlags;
+
+ /* This functions are not documneted in MSDN for this struct, here is directx/reactx alpha blend */
+ if ( pMisc.Reserved )
{
- // FIXME GUID_D3DCallbacks2
+ pUserMisc->Reserved = (LPVOID) DdAlphaBlt;
}
- /* D3D Callbacks version 3 check and setup for DirectX/ ReactX */
- else if (IsEqualGUID(&pData->guidInfo, &GUID_D3DCallbacks3))
+ if ( pMisc.CreateSurfaceEx )
{
- // FIXME GUID_D3DCallbacks3
+ pUserMisc->CreateSurfaceEx = (LPDDHAL_CREATESURFACEEX) DdCreateSurfaceEx;
}
- /* D3DParseUnknownCommand Callbacks check and setup for DirectX/ ReactX */
- else if (IsEqualGUID(&pData->guidInfo, &GUID_D3DParseUnknownCommandCallback))
+ if ( pMisc.GetDriverState )
{
- // FIXME GUID_D3DParseUnknownCommandCallback
+ pUserMisc->GetDriverState = (LPDDHAL_GETDRIVERSTATE) NtGdiDdGetDriverState;
}
- /* MotionComp Callbacks check and setup for DirectX/ ReactX */
- else if (IsEqualGUID(&pData->guidInfo, &GUID_MotionCompCallbacks))
+ /* NOTE : pUserMisc->DestroyDDLocal is outdated and are not beign tuch */
+
+ /* Windows XP never repot back the true return value,
+ * it only report back if we have a driver or not
+ * ReactOS keep this behoir to be compatible with
+ * Windows XP
+ */
+ pData->ddRVal = retValue;
+ }
+
+ /* NT Callbacks check and setup for DirectX/ ReactX */
+ else if (IsEqualGUID(&pData->guidInfo, &GUID_NTCallbacks))
+ {
+ /* MS does not have DHAL_* version of this callbacks
+ * so we are force using PDD_* callbacks here
+ */
+ DD_NTCALLBACKS pNtKernel;
+ PDD_NTCALLBACKS pUserNtKernel = (PDD_NTCALLBACKS)pData->lpvData;
+
+ /* Clear internal out buffer and set it up*/
+ RtlZeroMemory(&pNtKernel, sizeof(DD_NTCALLBACKS));
+ pNtKernel.dwSize = sizeof(DD_NTCALLBACKS);
+
+ /* set up internal buffer */
+ pDrvInfoData.lpvData = (PVOID)&pNtKernel;
+ pDrvInfoData.dwExpectedSize = sizeof(DD_NTCALLBACKS) ;
+
+ /* Call win32k */
+ retValue = NtGdiDdGetDriverInfo(hDD, (PDD_GETDRIVERINFODATA)&pDrvInfoData);
+
+ pData->dwActualSize = sizeof(DD_NTCALLBACKS);
+
+ pUserNtKernel->dwSize = sizeof(DD_NTCALLBACKS);
+ pUserNtKernel->dwFlags = pNtKernel.dwFlags;
+ pUserNtKernel->FreeDriverMemory = 0;
+
+ if (pNtKernel.SetExclusiveMode)
{
- // FIXME GUID_MotionCompCallbacks
+ pUserNtKernel->SetExclusiveMode = (PDD_SETEXCLUSIVEMODE) DdSetExclusiveMode;
}
- /* FIXME VPE2 Callbacks check and setup for DirectX/ ReactX */
- //else if (IsEqualGUID(&pData->guidInfo, &GUID_VPE2Callbacks))
- //{
- // FIXME GUID_VPE2Callbacks
- //}
- else
+ if (pNtKernel.FlipToGDISurface)
{
- /* set up internal buffer */
- pDrvInfoData.dwExpectedSize = pData->dwExpectedSize;
- pDrvInfoData.lpvData = pData->lpvData;
-
- /* We do not cover all callbacks for user mode, they are only cover by kmode */
- retValue = NtGdiDdGetDriverInfo(hDD, (PDD_GETDRIVERINFODATA)&pDrvInfoData);
-
- /* Setup return data */
- pData->dwActualSize = pDrvInfoData.dwActualSize;
- pData->lpvData = pDrvInfoData.lpvData;
- /* Windows XP never repot back the true return value,
- * it only report back if we have a driver or not
- * ReactOS keep this behoir to be compatible with
- * Windows XP
- */
- pData->ddRVal = retValue;
+ pUserNtKernel->FlipToGDISurface = (PDD_FLIPTOGDISURFACE) DdFlipToGDISurface;
}
+ /* Windows XP never repot back the true return value,
+ * it only report back if we have a driver or not
+ * ReactOS keep this behoir to be compatible with
+ * Windows XP
+ */
+ pData->ddRVal = retValue;
+ }
+
+ /* D3D Callbacks version 2 check and setup for DirectX/ ReactX */
+ else if (IsEqualGUID(&pData->guidInfo, &GUID_D3DCallbacks2))
+ {
+ // FIXME GUID_D3DCallbacks2
+ }
+
+ /* D3D Callbacks version 3 check and setup for DirectX/ ReactX */
+ else if (IsEqualGUID(&pData->guidInfo, &GUID_D3DCallbacks3))
+ {
+ // FIXME GUID_D3DCallbacks3
+ }
+
+ /* D3DParseUnknownCommand Callbacks check and setup for DirectX/ ReactX */
+ else if (IsEqualGUID(&pData->guidInfo, &GUID_D3DParseUnknownCommandCallback))
+ {
+ // FIXME GUID_D3DParseUnknownCommandCallback
+ }
+
+ /* MotionComp Callbacks check and setup for DirectX/ ReactX */
+ else if (IsEqualGUID(&pData->guidInfo, &GUID_MotionCompCallbacks))
+ {
+ // FIXME GUID_MotionCompCallbacks
+ }
+
+ /* FIXME VPE2 Callbacks check and setup for DirectX/ ReactX */
+ //else if (IsEqualGUID(&pData->guidInfo, &GUID_VPE2Callbacks))
+ //{
+ // FIXME GUID_VPE2Callbacks
+ //}
+ else
+ {
+ /* set up internal buffer */
+ pDrvInfoData.dwExpectedSize = pData->dwExpectedSize;
+ pDrvInfoData.lpvData = pData->lpvData;
+
+ /* We do not cover all callbacks for user mode, they are only cover by kmode */
+ retValue = NtGdiDdGetDriverInfo(hDD, (PDD_GETDRIVERINFODATA)&pDrvInfoData);
+
+ /* Setup return data */
+ pData->dwActualSize = pDrvInfoData.dwActualSize;
+ pData->lpvData = pDrvInfoData.lpvData;
+ /* Windows XP never repot back the true return value,
+ * it only report back if we have a driver or not
+ * ReactOS keep this behoir to be compatible with
+ * Windows XP
+ */
+ pData->ddRVal = retValue;
+ }
+
return retValue;
}
*
* D3dContextCreate
*/
-BOOL
-WINAPI
+BOOL
+WINAPI
D3dContextCreate(LPD3DHAL_CONTEXTCREATEDATA pdcci)
{
HANDLE hSurfZ = NULL;
{
hSurfZ = (HANDLE)pdcci->lpDDSZLcl->hDDSurface;
}
-
- return NtGdiD3dContextCreate(GetDdHandle(pdcci->lpDDLcl->hDD),
+
+ return NtGdiD3dContextCreate(GetDdHandle(pdcci->lpDDLcl->hDD),
(HANDLE)pdcci->lpDDSLcl->hDDSurface,
hSurfZ,
(D3DNTHAL_CONTEXTCREATEI *)pdcci);
WINAPI
DdCanCreateD3DBuffer(LPDDHAL_CANCREATESURFACEDATA CanCreateD3DBuffer)
{
- /*
- * Note : This functions are basic same, in win32k
- * NtGdiDdCanCreateD3DBuffer and NtGdiDdCanCreateSurface are mergs
- * toghter in win32k at end and retrurn same data, it is still sepreated
- * at user mode but in kmode it is not.
+ /*
+ * Note : This functions are basic same, in win32k
+ * NtGdiDdCanCreateD3DBuffer and NtGdiDdCanCreateSurface are mergs
+ * toghter in win32k at end and retrurn same data, it is still sepreated
+ * at user mode but in kmode it is not.
*/
/* Call win32k */
return NtGdiDdCanCreateD3DBuffer(GetDdHandle(CanCreateD3DBuffer->lpDD->hDD),
- (PDD_CANCREATESURFACEDATA)CanCreateD3DBuffer);
+ (PDD_CANCREATESURFACEDATA)CanCreateD3DBuffer);
}
{
/* Call win32k */
return NtGdiDdUnlock((HANDLE)Unlock->lpDDSurface->hDDSurface,
- (PDD_UNLOCKDATA)Unlock);
+ (PDD_UNLOCKDATA)Unlock);
}
/* Create the object */
pSurface->hDDSurface = (DWORD)NtGdiDdCreateSurfaceObject(GetDdHandle(pSurface->lpGbl->lpDD->hDD),
- (HANDLE)pSurface->hDDSurface,
- &SurfaceLocal,
- &SurfaceMore,
- &SurfaceGlobal,
- bComplete);
+ (HANDLE)pSurface->hDDSurface,
+ &SurfaceLocal,
+ &SurfaceMore,
+ &SurfaceGlobal,
+ bComplete);
/* Return status */
if (pSurface->hDDSurface) return TRUE;
else
{
/* Using the per-process object, so create it */
- pDirectDrawGlobal->hDD = (ULONG_PTR)NtGdiDdCreateDirectDrawObject(hdc);
+ pDirectDrawGlobal->hDD = (ULONG_PTR)NtGdiDdCreateDirectDrawObject(hdc);
/* Set the return value */
Return = pDirectDrawGlobal->hDD ? TRUE : FALSE;
LPDDSURFACEDESC pD3dTextureFormats,
LPDWORD pdwFourCC,
LPVIDMEM pvmList)
- {
+{
PVIDEOMEMORY VidMemList = NULL;
DD_HALINFO HalInfo;
D3DNTHAL_CALLBACKS D3dCallbacks;
/* Note : XP always alloc 24*sizeof(VIDEOMEMORY) of pvmlist so we change it to it */
if ( (pvmList != NULL) &&
- (pHalInfo->vmiData.dwNumHeaps != 0) )
+ (pHalInfo->vmiData.dwNumHeaps != 0) )
{
- VidMemList = (PVIDEOMEMORY) HeapAlloc(GetProcessHeap(), HEAP_ZERO_MEMORY, (sizeof(VIDEOMEMORY) * 24 ) * pHalInfo->vmiData.dwNumHeaps);
+ VidMemList = (PVIDEOMEMORY) HeapAlloc(GetProcessHeap(), HEAP_ZERO_MEMORY, (sizeof(VIDEOMEMORY) * 24 ) * pHalInfo->vmiData.dwNumHeaps);
}
/* Check for NT5+ D3D Data */
if ( (D3dCallbacks.dwSize != 0) &&
- (D3dDriverData.dwSize != 0) )
+ (D3dDriverData.dwSize != 0) )
{
/* Write these down */
pHalInfo->lpD3DGlobalDriverData = (ULONG_PTR)pD3dDriverData;
pHalInfo->vmiData.dwOffscreenAlign = HalInfo.vmiData.dwOffscreenAlign;
pHalInfo->vmiData.dwOverlayAlign = HalInfo.vmiData.dwOverlayAlign;
pHalInfo->vmiData.dwTextureAlign = HalInfo.vmiData.dwTextureAlign;
- pHalInfo->vmiData.dwZBufferAlign = HalInfo.vmiData.dwZBufferAlign;
+ pHalInfo->vmiData.dwZBufferAlign = HalInfo.vmiData.dwZBufferAlign;
pHalInfo->vmiData.dwAlphaAlign = HalInfo.vmiData.dwAlphaAlign;
pHalInfo->vmiData.dwNumHeaps = dwNumHeaps;
pHalInfo->vmiData.pvmList = pvmList;
- RtlCopyMemory( &pHalInfo->ddCaps,
+ RtlCopyMemory( &pHalInfo->ddCaps,
&HalInfo.ddCaps,
sizeof(DDCORECAPS ));
pHalInfo->ddCaps.dwNumFourCCCodes = FourCCs;
pHalInfo->lpdwFourCC = pdwFourCC;
-
+
/* always force rope 0x1000 for hal it mean only source copy is supported */
- pHalInfo->ddCaps.dwRops[6] = 0x1000;
+ pHalInfo->ddCaps.dwRops[6] = 0x1000;
- /* Set the HAL flags what ReactX got from the driver
- * Windows XP force setting DDHALINFO_GETDRIVERINFOSET if the driver does not set it
- * and ReactX doing same to keep compatible with drivers, but the driver are
- * force support DdGetDriverInfo acoriding MSDN but it seam some driver do not set
+ /* Set the HAL flags what ReactX got from the driver
+ * Windows XP force setting DDHALINFO_GETDRIVERINFOSET if the driver does not set it
+ * and ReactX doing same to keep compatible with drivers, but the driver are
+ * force support DdGetDriverInfo acoriding MSDN but it seam some driver do not set
* this flag even it is being supported. that is mean. It is small hack to keep
* bad driver working, that trust this is always being setting by it self at end
*/
- pHalInfo->dwFlags = (HalInfo.dwFlags & ~DDHALINFO_GETDRIVERINFOSET) | DDHALINFO_GETDRIVERINFOSET;
+ pHalInfo->dwFlags = (HalInfo.dwFlags & ~DDHALINFO_GETDRIVERINFOSET) | DDHALINFO_GETDRIVERINFOSET;
pHalInfo->GetDriverInfo = (LPDDHAL_GETDRIVERINFO) DdGetDriverInfo;
/* Now check if we got any DD callbacks */
RtlZeroMemory(pDDCallbacks, sizeof(DDHAL_DDCALLBACKS));
pDDCallbacks->dwSize = sizeof(DDHAL_DDCALLBACKS);
- /* Set the flags for this structure
- * Windows XP force setting DDHAL_CB32_CREATESURFACE if the driver does not set it
- * and ReactX doing same to keep compatible with drivers, but the driver are
- * force support pDDCallbacks acoriding MSDN but it seam some driver do not set
+ /* Set the flags for this structure
+ * Windows XP force setting DDHAL_CB32_CREATESURFACE if the driver does not set it
+ * and ReactX doing same to keep compatible with drivers, but the driver are
+ * force support pDDCallbacks acoriding MSDN but it seam some driver do not set
* this flag even it is being supported. that is mean. It is small hack to keep
* bad driver working, that trust this is always being setting by it self at end
*/
Flags = (CallbackFlags[0] & ~DDHAL_CB32_CREATESURFACE) | DDHAL_CB32_CREATESURFACE;
pDDCallbacks->dwFlags = Flags;
-
+
/* Write the always-on functions */
pDDCallbacks->CreateSurface = DdCreateSurface;
}
/* Check for DD Surface Callbacks */
- if (pDDSurfaceCallbacks)
+ if (pDDSurfaceCallbacks)
{
/* Zero the structures */
RtlZeroMemory(pDDSurfaceCallbacks, sizeof(DDHAL_DDSURFACECALLBACKS));
pDDSurfaceCallbacks->dwSize = sizeof(DDHAL_DDSURFACECALLBACKS);
- /* Set the flags for this structure
- * Windows XP force setting DDHAL_SURFCB32_LOCK, DDHAL_SURFCB32_UNLOCK,
- * DDHAL_SURFCB32_SETCOLORKEY, DDHAL_SURFCB32_DESTROYSURFACE if the driver
- * does not set it and ReactX doing same to keep compatible with drivers,
- * but the driver are force support pDDSurfaceCallbacks acoriding MSDN but it seam
- * some driver do not set this flag even it is being supported. that is mean.
- * It is small hack to keep bad driver working, that trust this is always being
+ /* Set the flags for this structure
+ * Windows XP force setting DDHAL_SURFCB32_LOCK, DDHAL_SURFCB32_UNLOCK,
+ * DDHAL_SURFCB32_SETCOLORKEY, DDHAL_SURFCB32_DESTROYSURFACE if the driver
+ * does not set it and ReactX doing same to keep compatible with drivers,
+ * but the driver are force support pDDSurfaceCallbacks acoriding MSDN but it seam
+ * some driver do not set this flag even it is being supported. that is mean.
+ * It is small hack to keep bad driver working, that trust this is always being
* setting by it self at end
*/
Flags = (CallbackFlags[1] & ~(DDHAL_SURFCB32_LOCK | DDHAL_SURFCB32_UNLOCK |
DDHAL_SURFCB32_SETCOLORKEY | DDHAL_SURFCB32_DESTROYSURFACE)) |
- (DDHAL_SURFCB32_LOCK | DDHAL_SURFCB32_UNLOCK |
- DDHAL_SURFCB32_SETCOLORKEY | DDHAL_SURFCB32_DESTROYSURFACE);
-
+ (DDHAL_SURFCB32_LOCK | DDHAL_SURFCB32_UNLOCK |
+ DDHAL_SURFCB32_SETCOLORKEY | DDHAL_SURFCB32_DESTROYSURFACE);
+
pDDSurfaceCallbacks->dwFlags = Flags;
-
+
/* Write the always-on functions */
pDDSurfaceCallbacks->Lock = DdLock;
pDDSurfaceCallbacks->Unlock = DdUnlock;
}
}
- /* Check for DD Palette Callbacks, This interface are dead for user mode,
- * only what it can support are being report back.
+ /* Check for DD Palette Callbacks, This interface are dead for user mode,
+ * only what it can support are being report back.
*/
if (pDDPaletteCallbacks)
{
{
/* Zero the struct */
RtlZeroMemory(pD3dBufferCallbacks, sizeof(DDHAL_DDEXEBUFCALLBACKS));
-
+
if ( D3dBufferCallbacks.dwSize)
{
pD3dBufferCallbacks->dwSize = D3dBufferCallbacks.dwSize;
{
pD3dBufferCallbacks->UnlockExecuteBuffer = (LPDDHALEXEBUFCB_UNLOCKEXEBUF) DdUnlockD3D;
}
-
- }
+
+ }
}
/* FIXME VidMemList */
HeapFree(GetProcessHeap(), 0, VidMemList);
}
- return retVal;
+ return retVal;
}
/*
WINAPI
DdQueryDisplaySettingsUniqueness()
{
- return GdiSharedHandleTable->flDeviceUniq;
+ return GdiSharedHandleTable->flDeviceUniq;
}
/*