mirror of
https://github.com/reactos/reactos.git
synced 2024-09-05 18:26:53 +00:00
fixing minior bugs in DdQueryDirectDrawObject
some data was not fill in svn path=/trunk/; revision=26035
This commit is contained in:
parent
038309c488
commit
619c975c6a
|
@ -465,9 +465,15 @@ DdQueryDirectDrawObject(LPDDRAWI_DIRECTDRAW_GBL pDirectDrawGlobal,
|
||||||
D3DNTHAL_GLOBALDRIVERDATA D3dDriverData;
|
D3DNTHAL_GLOBALDRIVERDATA D3dDriverData;
|
||||||
DD_D3DBUFCALLBACKS D3dBufferCallbacks;
|
DD_D3DBUFCALLBACKS D3dBufferCallbacks;
|
||||||
DWORD CallbackFlags[3];
|
DWORD CallbackFlags[3];
|
||||||
DWORD dwNumHeaps=0, FourCCs;
|
DWORD dwNumHeaps=0, FourCCs=0;
|
||||||
DWORD Flags;
|
DWORD Flags;
|
||||||
|
|
||||||
|
/* Clear the structures */
|
||||||
|
RtlZeroMemory(&HalInfo, sizeof(DD_HALINFO));
|
||||||
|
RtlZeroMemory(&D3dCallbacks, sizeof(D3DNTHAL_CALLBACKS));
|
||||||
|
RtlZeroMemory(&D3dDriverData, sizeof(D3DNTHAL_GLOBALDRIVERDATA));
|
||||||
|
RtlZeroMemory(&D3dBufferCallbacks, sizeof(DD_D3DBUFCALLBACKS));
|
||||||
|
|
||||||
/* Check if we got a list pointer */
|
/* Check if we got a list pointer */
|
||||||
if (pvmList)
|
if (pvmList)
|
||||||
{
|
{
|
||||||
|
@ -477,13 +483,7 @@ DdQueryDirectDrawObject(LPDDRAWI_DIRECTDRAW_GBL pDirectDrawGlobal,
|
||||||
pHalInfo->vmiData.dwNumHeaps);
|
pHalInfo->vmiData.dwNumHeaps);
|
||||||
}
|
}
|
||||||
|
|
||||||
/* Clear the structures */
|
/* Do the query */
|
||||||
RtlZeroMemory(&HalInfo, sizeof(DD_HALINFO));
|
|
||||||
RtlZeroMemory(&D3dCallbacks, sizeof(D3DNTHAL_CALLBACKS));
|
|
||||||
RtlZeroMemory(&D3dDriverData, sizeof(D3DNTHAL_GLOBALDRIVERDATA));
|
|
||||||
RtlZeroMemory(&D3dBufferCallbacks, sizeof(DD_D3DBUFCALLBACKS));
|
|
||||||
|
|
||||||
//* Do the query */
|
|
||||||
if (!NtGdiDdQueryDirectDrawObject(GetDdHandle(pDirectDrawGlobal->hDD),
|
if (!NtGdiDdQueryDirectDrawObject(GetDdHandle(pDirectDrawGlobal->hDD),
|
||||||
&HalInfo,
|
&HalInfo,
|
||||||
CallbackFlags,
|
CallbackFlags,
|
||||||
|
@ -531,7 +531,11 @@ DdQueryDirectDrawObject(LPDDRAWI_DIRECTDRAW_GBL pDirectDrawGlobal,
|
||||||
pHalInfo->vmiData.dwDisplayHeight = HalInfo.vmiData.dwDisplayHeight;
|
pHalInfo->vmiData.dwDisplayHeight = HalInfo.vmiData.dwDisplayHeight;
|
||||||
pHalInfo->vmiData.lDisplayPitch = HalInfo.vmiData.lDisplayPitch;
|
pHalInfo->vmiData.lDisplayPitch = HalInfo.vmiData.lDisplayPitch;
|
||||||
pHalInfo->vmiData.fpPrimary = 0;
|
pHalInfo->vmiData.fpPrimary = 0;
|
||||||
pHalInfo->vmiData.ddpfDisplay = HalInfo.vmiData.ddpfDisplay;
|
|
||||||
|
RtlCopyMemory( &pHalInfo->vmiData.ddpfDisplay,
|
||||||
|
&HalInfo.vmiData.ddpfDisplay,
|
||||||
|
sizeof(DDPIXELFORMAT));
|
||||||
|
|
||||||
pHalInfo->vmiData.dwOffscreenAlign = HalInfo.vmiData.dwOffscreenAlign;
|
pHalInfo->vmiData.dwOffscreenAlign = HalInfo.vmiData.dwOffscreenAlign;
|
||||||
pHalInfo->vmiData.dwOverlayAlign = HalInfo.vmiData.dwOverlayAlign;
|
pHalInfo->vmiData.dwOverlayAlign = HalInfo.vmiData.dwOverlayAlign;
|
||||||
pHalInfo->vmiData.dwTextureAlign = HalInfo.vmiData.dwTextureAlign;
|
pHalInfo->vmiData.dwTextureAlign = HalInfo.vmiData.dwTextureAlign;
|
||||||
|
@ -539,11 +543,15 @@ DdQueryDirectDrawObject(LPDDRAWI_DIRECTDRAW_GBL pDirectDrawGlobal,
|
||||||
pHalInfo->vmiData.dwAlphaAlign = HalInfo.vmiData.dwAlphaAlign;
|
pHalInfo->vmiData.dwAlphaAlign = HalInfo.vmiData.dwAlphaAlign;
|
||||||
pHalInfo->vmiData.dwNumHeaps = dwNumHeaps;
|
pHalInfo->vmiData.dwNumHeaps = dwNumHeaps;
|
||||||
pHalInfo->vmiData.pvmList = pvmList;
|
pHalInfo->vmiData.pvmList = pvmList;
|
||||||
// pHalInfo->ddCaps = HalInfo.ddCaps;
|
|
||||||
// pHalInfo->ddCaps.dwNumFourCCCodes = FourCCs;
|
RtlCopyMemory( &pHalInfo->ddCaps, &HalInfo.ddCaps,sizeof(DDCORECAPS ));
|
||||||
|
|
||||||
|
pHalInfo->ddCaps.dwNumFourCCCodes = FourCCs;
|
||||||
pHalInfo->lpdwFourCC = pdwFourCC;
|
pHalInfo->lpdwFourCC = pdwFourCC;
|
||||||
pHalInfo->ddCaps.dwRops[6] = 0x1000;
|
pHalInfo->ddCaps.dwRops[6] = 0x1000;
|
||||||
pHalInfo->dwFlags = HalInfo.dwFlags | DDHALINFO_GETDRIVERINFOSET;
|
|
||||||
|
/* FIXME implement DdGetDriverInfo */
|
||||||
|
// pHalInfo->dwFlags = HalInfo.dwFlags | DDHALINFO_GETDRIVERINFOSET;
|
||||||
// pHalInfo->GetDriverInfo = DdGetDriverInfo;
|
// pHalInfo->GetDriverInfo = DdGetDriverInfo;
|
||||||
|
|
||||||
/* Now check if we got any DD callbacks */
|
/* Now check if we got any DD callbacks */
|
||||||
|
@ -587,7 +595,6 @@ DdQueryDirectDrawObject(LPDDRAWI_DIRECTDRAW_GBL pDirectDrawGlobal,
|
||||||
/* Set the flags for this one */
|
/* Set the flags for this one */
|
||||||
Flags = CallbackFlags[1];
|
Flags = CallbackFlags[1];
|
||||||
|
|
||||||
|
|
||||||
/* Write the header, note that some functions are always exposed */
|
/* Write the header, note that some functions are always exposed */
|
||||||
pDDSurfaceCallbacks->dwSize = sizeof(DDHAL_DDSURFACECALLBACKS);
|
pDDSurfaceCallbacks->dwSize = sizeof(DDHAL_DDSURFACECALLBACKS);
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue