really small change using DDSURFACEDESC2 instead of DDSURFACEDESC, for these struct basic same but DDSURFACEDESC2 have few more member at end. and it is type casted around DDSURFACEDESC when it pass down. u can found that info in msdn, ddk, sdk

svn path=/trunk/; revision=23259
This commit is contained in:
Magnus Olsen 2006-07-23 20:54:53 +00:00
parent 7b88a669e2
commit 5cfb6a6d48
3 changed files with 7 additions and 10 deletions

View file

@ -634,7 +634,7 @@ HRESULT WINAPI Main_DirectDraw_CreateSurface (LPDIRECTDRAW7 iface, LPDDSURFACEDE
memcpy(&That->Owner->mddsdPrimary,pDDSD,sizeof(DDSURFACEDESC));
That->Owner->mddsdPrimary.dwSize = sizeof(DDSURFACEDESC);
This->mDdCanCreateSurface.bIsDifferentPixelFormat = FALSE;
This->mDdCanCreateSurface.lpDDSurfaceDesc = &That->Owner->mddsdPrimary;
This->mDdCanCreateSurface.lpDDSurfaceDesc = (DDSURFACEDESC*)&That->Owner->mddsdPrimary;
if (This->mDdCanCreateSurface.CanCreateSurface(&This->mDdCanCreateSurface)== DDHAL_DRIVER_NOTHANDLED)
{
@ -672,7 +672,7 @@ HRESULT WINAPI Main_DirectDraw_CreateSurface (LPDIRECTDRAW7 iface, LPDDSURFACEDE
This->mDdCreateSurface.lpDDSurfaceDesc = &That->Owner->mddsdPrimary;
This->mDdCreateSurface.lpDDSurfaceDesc = (DDSURFACEDESC*)&That->Owner->mddsdPrimary;
This->mDdCreateSurface.lplpSList = That->Owner->mpPrimaryLocals;
This->mDdCreateSurface.dwSCnt = This->mDDrawGlobal.dsList->dwIntRefCnt ;

View file

@ -71,10 +71,7 @@ typedef struct
DWORD *mpFourCC;
UINT mcTextures;
DDSURFACEDESC *mpTextures;
DDSURFACEDESC2 *mpTextures;
/* ExclusiveOwner */
@ -106,7 +103,7 @@ typedef struct
DDRAWI_DDRAWCLIPPER_LCL mPrimaryClipperLocal;
DDRAWI_DDRAWCLIPPER_GBL mPrimaryClipperGlobal;
DDSURFACEDESC mddsdPrimary;
DDSURFACEDESC2 mddsdPrimary;
/* adding a switch */
DWORD devicetype;

View file

@ -291,7 +291,7 @@ StartDirectDrawHal(LPDIRECTDRAW* iface)
}
This->mcTextures = This->mD3dDriverData.dwNumTextureFormats;
This->mpTextures = (DDSURFACEDESC*) DxHeapMemAlloc(sizeof(DDSURFACEDESC) * This->mcTextures);
This->mpTextures = (DDSURFACEDESC2*) DxHeapMemAlloc(sizeof(DDSURFACEDESC2) * This->mcTextures);
if (This->mpTextures == NULL)
{
DxHeapMemFree( This->mpFourCC);
@ -304,7 +304,7 @@ StartDirectDrawHal(LPDIRECTDRAW* iface)
This->mHALInfo.vmiData.pvmList = This->mpvmList;
This->mHALInfo.lpdwFourCC = This->mpFourCC;
This->mD3dDriverData.lpTextureFormats = This->mpTextures;
This->mD3dDriverData.lpTextureFormats = (DDSURFACEDESC*) This->mpTextures;
if (!DdQueryDirectDrawObject(
&This->mDDrawGlobal,
@ -315,7 +315,7 @@ StartDirectDrawHal(LPDIRECTDRAW* iface)
&This->mD3dCallbacks,
&This->mD3dDriverData,
&This->mCallbacks.HALDDExeBuf,
This->mpTextures,
(DDSURFACEDESC*)This->mpTextures,
This->mpFourCC,
This->mpvmList))