Commit 4ae5380c authored by Michael Karcher's avatar Michael Karcher Committed by Alexandre Julliard

Set the correct length of the struct DDSURFACEDESC.

parent e33f327f
......@@ -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
......
......@@ -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*/
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment