Set the correct length of the struct DDSURFACEDESC.
This commit is contained in:
parent
e33f327fe9
commit
4ae5380cbb
|
@ -326,9 +326,13 @@ struct displaymodescallback_context
|
||||||
static HRESULT CALLBACK
|
static HRESULT CALLBACK
|
||||||
EnumDisplayModesCallbackThunk(LPDDSURFACEDESC2 pDDSD2, LPVOID context)
|
EnumDisplayModesCallbackThunk(LPDDSURFACEDESC2 pDDSD2, LPVOID context)
|
||||||
{
|
{
|
||||||
|
DDSURFACEDESC DDSD;
|
||||||
struct displaymodescallback_context *cbcontext = context;
|
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
|
static HRESULT WINAPI
|
||||||
|
|
|
@ -979,7 +979,7 @@ typedef struct _DDSURFACEDESC
|
||||||
|
|
||||||
typedef struct _DDSURFACEDESC2
|
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 dwFlags; /* 4: determines what fields are valid*/
|
||||||
DWORD dwHeight; /* 8: height of surface to be created*/
|
DWORD dwHeight; /* 8: height of surface to be created*/
|
||||||
DWORD dwWidth; /* C: width of input surface*/
|
DWORD dwWidth; /* C: width of input surface*/
|
||||||
|
|
Loading…
Reference in New Issue