Revert "d3d: Remove AddRef from IWineD3DDevice_GetIndices.".
This reverts commit 5c4008719c
.
This commit is contained in:
parent
c40501db50
commit
9dd81f64cb
|
@ -1311,6 +1311,7 @@ static HRESULT WINAPI IDirect3DDevice8Impl_GetIndices(LPDIRECT3DDEVICE8 iface, I
|
||||||
rc = IWineD3DDevice_GetIndices(This->WineD3DDevice, &retIndexData, &tmp);
|
rc = IWineD3DDevice_GetIndices(This->WineD3DDevice, &retIndexData, &tmp);
|
||||||
if (D3D_OK == rc && NULL != retIndexData) {
|
if (D3D_OK == rc && NULL != retIndexData) {
|
||||||
IWineD3DVertexBuffer_GetParent(retIndexData, (IUnknown **)ppIndexData);
|
IWineD3DVertexBuffer_GetParent(retIndexData, (IUnknown **)ppIndexData);
|
||||||
|
IWineD3DVertexBuffer_Release(retIndexData);
|
||||||
} else {
|
} else {
|
||||||
if(rc != D3D_OK) FIXME("Call to GetIndices failed\n");
|
if(rc != D3D_OK) FIXME("Call to GetIndices failed\n");
|
||||||
*ppIndexData = NULL;
|
*ppIndexData = NULL;
|
||||||
|
|
|
@ -833,6 +833,7 @@ static HRESULT WINAPI IDirect3DDevice9Impl_GetIndices(LPDIRECT3DDEVICE9 iface,
|
||||||
rc = IWineD3DDevice_GetIndices(This->WineD3DDevice, &retIndexData, &tmp);
|
rc = IWineD3DDevice_GetIndices(This->WineD3DDevice, &retIndexData, &tmp);
|
||||||
if (rc == D3D_OK && NULL != retIndexData) {
|
if (rc == D3D_OK && NULL != retIndexData) {
|
||||||
IWineD3DVertexBuffer_GetParent(retIndexData, (IUnknown **)ppIndexData);
|
IWineD3DVertexBuffer_GetParent(retIndexData, (IUnknown **)ppIndexData);
|
||||||
|
IWineD3DVertexBuffer_Release(retIndexData);
|
||||||
}else{
|
}else{
|
||||||
if(rc != D3D_OK) FIXME("Call to GetIndices failed\n");
|
if(rc != D3D_OK) FIXME("Call to GetIndices failed\n");
|
||||||
*ppIndexData = NULL;
|
*ppIndexData = NULL;
|
||||||
|
|
|
@ -3244,7 +3244,9 @@ static HRESULT WINAPI IWineD3DDeviceImpl_GetIndices(IWineD3DDevice *iface, IWine
|
||||||
|
|
||||||
*ppIndexData = This->stateBlock->pIndexData;
|
*ppIndexData = This->stateBlock->pIndexData;
|
||||||
|
|
||||||
|
/* up ref count on ppindexdata */
|
||||||
if (*ppIndexData) {
|
if (*ppIndexData) {
|
||||||
|
IWineD3DIndexBuffer_AddRef(*ppIndexData);
|
||||||
*pBaseVertexIndex = This->stateBlock->baseVertexIndex;
|
*pBaseVertexIndex = This->stateBlock->baseVertexIndex;
|
||||||
TRACE("(%p) index data set to %p + %u\n", This, ppIndexData, This->stateBlock->baseVertexIndex);
|
TRACE("(%p) index data set to %p + %u\n", This, ppIndexData, This->stateBlock->baseVertexIndex);
|
||||||
}else{
|
}else{
|
||||||
|
|
Loading…
Reference in New Issue