wined3d: Initialise WINED3DVERTEXELEMENT's Reg field in

IWineD3DVertexDeclarationImpl_ParseDeclaration9.
This commit is contained in:
H. Verbeet 2006-03-22 19:47:16 +00:00 committed by Alexandre Julliard
parent 46b13aaa58
commit f716eea3df
2 changed files with 2 additions and 1 deletions

View File

@ -383,6 +383,7 @@ static HRESULT IWineD3DVertexDeclarationImpl_ParseDeclaration9(IWineD3DVertexDec
This->pDeclarationWine = HeapAlloc(GetProcessHeap(), 0, This->declaration9NumElements * sizeof(WINED3DVERTEXELEMENT)); This->pDeclarationWine = HeapAlloc(GetProcessHeap(), 0, This->declaration9NumElements * sizeof(WINED3DVERTEXELEMENT));
for(i = 0; i < This->declaration9NumElements; ++i) { for(i = 0; i < This->declaration9NumElements; ++i) {
memcpy(This->pDeclarationWine + i, This->pDeclaration9 + i, sizeof(D3DVERTEXELEMENT9)); memcpy(This->pDeclarationWine + i, This->pDeclaration9 + i, sizeof(D3DVERTEXELEMENT9));
This->pDeclarationWine[i].Reg = -1;
} }
This->declarationWNumElements = This->declaration9NumElements; This->declarationWNumElements = This->declaration9NumElements;

View File

@ -507,7 +507,7 @@ typedef struct _WINED3DVERTEXELEMENT {
BYTE Method; BYTE Method;
BYTE Usage; BYTE Usage;
BYTE UsageIndex; BYTE UsageIndex;
BYTE Reg; /* DirectX 8 */ int Reg; /* DirectX 8 */
} WINED3DVERTEXELEMENT, *LPWINED3DVERTEXELEMENT; } WINED3DVERTEXELEMENT, *LPWINED3DVERTEXELEMENT;