Commit 93fefdf4 authored by Oliver Stieber's avatar Oliver Stieber Committed by Alexandre Julliard

Disable the creation of invalid vertex declarations in d3d9 preventing

some applications from crashing.
parent 27088716
...@@ -124,13 +124,11 @@ HRESULT WINAPI IDirect3DDevice9Impl_SetVertexDeclaration(LPDIRECT3DDEVICE9 ifa ...@@ -124,13 +124,11 @@ HRESULT WINAPI IDirect3DDevice9Impl_SetVertexDeclaration(LPDIRECT3DDEVICE9 ifa
IDirect3DDevice9Impl *This = (IDirect3DDevice9Impl *)iface; IDirect3DDevice9Impl *This = (IDirect3DDevice9Impl *)iface;
IDirect3DVertexDeclaration9Impl *pDeclImpl = (IDirect3DVertexDeclaration9Impl *)pDecl; IDirect3DVertexDeclaration9Impl *pDeclImpl = (IDirect3DVertexDeclaration9Impl *)pDecl;
HRESULT hr = S_OK; HRESULT hr = S_OK;
/* TODO: implement stateblocks */
This->UpdateStateBlock->vertexDecl = NULL; FIXME("Disabled\n");
return D3DERR_INVALIDCALL;
if (NULL != pDecl) { if (NULL != pDecl) {
hr = IWineD3DDevice_SetVertexDeclaration(This->WineD3DDevice, pDeclImpl->wineD3DVertexDeclaration); hr = IWineD3DDevice_SetVertexDeclaration(This->WineD3DDevice, pDeclImpl->wineD3DVertexDeclaration);
if (SUCCEEDED(hr)) {
This->UpdateStateBlock->vertexDecl = (IDirect3DVertexDeclaration9Impl*) pDecl;
}
} }
return hr; return hr;
} }
...@@ -139,15 +137,16 @@ HRESULT WINAPI IDirect3DDevice9Impl_GetVertexDeclaration(LPDIRECT3DDEVICE9 ifa ...@@ -139,15 +137,16 @@ HRESULT WINAPI IDirect3DDevice9Impl_GetVertexDeclaration(LPDIRECT3DDEVICE9 ifa
IDirect3DDevice9Impl* This = (IDirect3DDevice9Impl*) iface; IDirect3DDevice9Impl* This = (IDirect3DDevice9Impl*) iface;
IWineD3DVertexDeclaration* pTest = NULL; IWineD3DVertexDeclaration* pTest = NULL;
HRESULT hr = S_OK; HRESULT hr = S_OK;
IDirect3DVertexDeclaration9Impl* pCur = This->StateBlock->vertexDecl; FIXME("Disabled\n");
return D3DERR_INVALIDCALL;
if (NULL == ppDecl) { if (NULL == ppDecl) {
return D3DERR_INVALIDCALL; return D3DERR_INVALIDCALL;
} }
*ppDecl = NULL; *ppDecl = NULL;
hr = IWineD3DDevice_GetVertexDeclaration(This->WineD3DDevice, &pTest); hr = IWineD3DDevice_GetVertexDeclaration(This->WineD3DDevice, &pTest);
if (SUCCEEDED(hr) && (NULL == pCur || pCur->wineD3DVertexDeclaration == pTest)) { if (SUCCEEDED(hr)) {
*ppDecl = (IDirect3DVertexDeclaration9*) pCur; *ppDecl = NULL;
} }
return hr; return hr;
} }
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