Set the correct length of the struct DDSURFACEDESC.

oldstable
Michael Karcher 2002-07-22 20:37:01 +00:00 committed by Alexandre Julliard
parent e33f327fe9
commit 4ae5380cbb
2 changed files with 6 additions and 2 deletions

View File

@ -326,9 +326,13 @@ struct displaymodescallback_context
static HRESULT CALLBACK
EnumDisplayModesCallbackThunk(LPDDSURFACEDESC2 pDDSD2, LPVOID context)
{
DDSURFACEDESC DDSD;
struct displaymodescallback_context *cbcontext = context;
return cbcontext->func((LPDDSURFACEDESC)pDDSD2, cbcontext->context);
memcpy(&DDSD,pDDSD2,sizeof DDSD);
DDSD.dwSize = sizeof DDSD;
return cbcontext->func(&DDSD, cbcontext->context);
}
static HRESULT WINAPI

View File

@ -979,7 +979,7 @@ typedef struct _DDSURFACEDESC
typedef struct _DDSURFACEDESC2
{
DWORD dwSize; /* 0: size of the DDSURFACEDESC structure*/
DWORD dwSize; /* 0: size of the DDSURFACEDESC2 structure*/
DWORD dwFlags; /* 4: determines what fields are valid*/
DWORD dwHeight; /* 8: height of surface to be created*/
DWORD dwWidth; /* C: width of input surface*/