Hi all, Do not apply my PATCH_D3D_60, it conflicts with Lionel's one. Use this one instead. Modified files : dlls/ddraw/d3dviewport.c dlls/ddraw/d3dvertexbuffer.c Changelog : Fix IDirect3DVertexBuffer interface. Implements GetVertexBufferDesc. Remove some useless FIXME. Christian Costa titan.costa@wanadoo.fr
diff -u ../../winebase/wine/dlls/ddraw/d3dvertexbuffer.c dlls/ddraw/d3dvertexbuffer.c --- ../../winebase/wine/dlls/ddraw/d3dvertexbuffer.c Sun Dec 29 07:50:58 2002 +++ dlls/ddraw/d3dvertexbuffer.c Sun Dec 29 07:51:57 2002 @@ -125,7 +125,7 @@ DWORD dwFlags) { ICOM_THIS_FROM(IDirect3DVertexBufferImpl, IDirect3DVertexBuffer7, iface); - FIXME("(%p/%p)->(%08lx,%08lx,%08lx,%p,%08lx,%p,%08lx): stub!\n", This, iface, dwVertexOp, dwDestIndex, dwCount, lpSrcBuffer, dwSrcIndex, lpD3DDevice, dwFlags); + FIXME("(%p/%p)->(%08lx,%08lx,%08lx,%p,%08lx,%p,%08lx): stub!\n", This, iface, dwVertexOp, dwDestIndex, dwCount, lpSrcBuffer, dwSrcIndex, lpD3DDevice, dwFlags); return DD_OK; } @@ -133,8 +133,11 @@ Main_IDirect3DVertexBufferImpl_7_1T_GetVertexBufferDesc(LPDIRECT3DVERTEXBUFFER7 iface, LPD3DVERTEXBUFFERDESC lpD3DVertexBufferDesc) { + DWORD size; ICOM_THIS_FROM(IDirect3DVertexBufferImpl, IDirect3DVertexBuffer7, iface); - FIXME("(%p/%p)->(%p): stub!\n", This, iface, lpD3DVertexBufferDesc); + TRACE("(%p/%p)->(%p)\n", This, iface, lpD3DVertexBufferDesc); + size = (lpD3DVertexBufferDesc->dwSize < This->desc.dwSize) ? lpD3DVertexBufferDesc->dwSize : This->desc.dwSize; + memcpy(lpD3DVertexBufferDesc,&This->desc,size); return DD_OK; } @@ -259,7 +262,7 @@ XCAST(ProcessVertices) Main_IDirect3DVertexBufferImpl_7_ProcessVertices, XCAST(GetVertexBufferDesc) Main_IDirect3DVertexBufferImpl_7_1T_GetVertexBufferDesc, XCAST(Optimize) Main_IDirect3DVertexBufferImpl_7_Optimize, - XCAST(ProcessVerticesStrided) Main_IDirect3DVertexBufferImpl_7_ProcessVerticesStrided, + XCAST(ProcessVerticesStrided) Main_IDirect3DVertexBufferImpl_7_ProcessVerticesStrided }; #if !defined(__STRICT_ANSI__) && defined(__GNUC__) @@ -276,14 +279,14 @@ ICOM_VTABLE(IDirect3DVertexBuffer) VTABLE_IDirect3DVertexBuffer = { ICOM_MSVTABLE_COMPAT_DummyRTTIVALUE - XCAST(QueryInterface) Thunk_IDirect3DVertexBufferImpl_1_GetVertexBufferDesc, - XCAST(AddRef) Thunk_IDirect3DVertexBufferImpl_1_GetVertexBufferDesc, - XCAST(Release) Thunk_IDirect3DVertexBufferImpl_1_GetVertexBufferDesc, - XCAST(Lock) Thunk_IDirect3DVertexBufferImpl_1_GetVertexBufferDesc, - XCAST(Unlock) Thunk_IDirect3DVertexBufferImpl_1_GetVertexBufferDesc, + XCAST(QueryInterface) Thunk_IDirect3DVertexBufferImpl_1_QueryInterface, + XCAST(AddRef) Thunk_IDirect3DVertexBufferImpl_1_AddRef, + XCAST(Release) Thunk_IDirect3DVertexBufferImpl_1_Release, + XCAST(Lock) Thunk_IDirect3DVertexBufferImpl_1_Lock, + XCAST(Unlock) Thunk_IDirect3DVertexBufferImpl_1_Unlock, XCAST(ProcessVertices) Main_IDirect3DVertexBufferImpl_1_ProcessVertices, XCAST(GetVertexBufferDesc) Thunk_IDirect3DVertexBufferImpl_1_GetVertexBufferDesc, - XCAST(Optimize) Main_IDirect3DVertexBufferImpl_1_Optimize, + XCAST(Optimize) Main_IDirect3DVertexBufferImpl_1_Optimize }; #if !defined(__STRICT_ANSI__) && defined(__GNUC__) diff -u ../../winebase/wine/dlls/ddraw/d3dviewport.c dlls/ddraw/d3dviewport.c --- ../../winebase/wine/dlls/ddraw/d3dviewport.c Sun Dec 29 07:30:39 2002 +++ dlls/ddraw/d3dviewport.c Sun Dec 29 07:51:57 2002 @@ -98,7 +98,7 @@ Main_IDirect3DViewportImpl_3_2_1_AddRef(LPDIRECT3DVIEWPORT3 iface) { ICOM_THIS_FROM(IDirect3DViewportImpl, IDirect3DViewport3, iface); - FIXME("(%p/%p)->() incrementing from %lu.\n", This, iface, This->ref); + TRACE("(%p/%p)->() incrementing from %lu.\n", This, iface, This->ref); return ++(This->ref); } @@ -106,7 +106,7 @@ Main_IDirect3DViewportImpl_3_2_1_Release(LPDIRECT3DVIEWPORT3 iface) { ICOM_THIS_FROM(IDirect3DViewportImpl, IDirect3DViewport3, iface); - FIXME("(%p/%p)->() decrementing from %lu.\n", This, iface, This->ref); + TRACE("(%p/%p)->() decrementing from %lu.\n", This, iface, This->ref); if (!--(This->ref)) { HeapFree(GetProcessHeap(), 0, This); return 0;