This patch set the DDCAPS dwSize member of the DDRAW object. This makes GetCaps to correctly copy (with DD_STRUCT_COPY_BYSIZE) the strucure to the application. Modified files : dlls/ddraw/ddraw/user.c Changelog : Initialize the DDCAPS structure of the DDRAW object at creation Christian Costa titan.costa@wanadoo.fr
Index: user.c =================================================================== RCS file: /home/wine/wine/dlls/ddraw/ddraw/user.c,v retrieving revision 1.9 diff -u -r1.9 user.c --- user.c 31 May 2002 23:25:45 -0000 1.9 +++ user.c 10 Oct 2002 21:33:32 -0000 @@ -219,6 +219,9 @@ * CoCreateInstanced then Initialized. */ This->private = (User_DirectDrawImpl *)(This+1); + /* Initialize the DDCAPS structure */ + This->caps.dwSize = sizeof(This->caps); + hr = User_DirectDraw_Construct(This, ex); if (FAILED(hr)) HeapFree(GetProcessHeap(), 0, This); @@ -237,6 +240,9 @@ This->private = HeapAlloc(GetProcessHeap(), HEAP_ZERO_MEMORY, sizeof(User_DirectDrawImpl)); if (This->private == NULL) return E_OUTOFMEMORY; + + /* Initialize the DDCAPS structure */ + This->caps.dwSize = sizeof(This->caps); hr = User_DirectDraw_Construct(This, TRUE); /* XXX ex? */ if (FAILED(hr))