Markus Amsler : Revert "d3d: Remove AddRef from
IWineD3DDevice_GetIndices." .
Alexandre Julliard
julliard at wine.codeweavers.com
Thu Nov 30 13:40:57 CST 2006
Module: wine
Branch: master
Commit: 9dd81f64cba4be3349934e66cf12e04621527d1f
URL: http://source.winehq.org/git/wine.git/?a=commit;h=9dd81f64cba4be3349934e66cf12e04621527d1f
Author: Markus Amsler <markus.amsler at oribi.org>
Date: Thu Nov 30 13:33:18 2006 +0100
Revert "d3d: Remove AddRef from IWineD3DDevice_GetIndices.".
This reverts commit 5c4008719c60af52e9370023f09c7b86b7768e85.
---
dlls/d3d8/device.c | 1 +
dlls/d3d9/device.c | 1 +
dlls/wined3d/device.c | 2 ++
3 files changed, 4 insertions(+), 0 deletions(-)
diff --git a/dlls/d3d8/device.c b/dlls/d3d8/device.c
index 99164e0..2b4b6dd 100644
--- a/dlls/d3d8/device.c
+++ b/dlls/d3d8/device.c
@@ -1311,6 +1311,7 @@ static HRESULT WINAPI IDirect3DDevice8Im
rc = IWineD3DDevice_GetIndices(This->WineD3DDevice, &retIndexData, &tmp);
if (D3D_OK == rc && NULL != retIndexData) {
IWineD3DVertexBuffer_GetParent(retIndexData, (IUnknown **)ppIndexData);
+ IWineD3DVertexBuffer_Release(retIndexData);
} else {
if(rc != D3D_OK) FIXME("Call to GetIndices failed\n");
*ppIndexData = NULL;
diff --git a/dlls/d3d9/device.c b/dlls/d3d9/device.c
index 8143981..d0a456a 100644
--- a/dlls/d3d9/device.c
+++ b/dlls/d3d9/device.c
@@ -833,6 +833,7 @@ static HRESULT WINAPI IDirect3DDevice9
rc = IWineD3DDevice_GetIndices(This->WineD3DDevice, &retIndexData, &tmp);
if (rc == D3D_OK && NULL != retIndexData) {
IWineD3DVertexBuffer_GetParent(retIndexData, (IUnknown **)ppIndexData);
+ IWineD3DVertexBuffer_Release(retIndexData);
}else{
if(rc != D3D_OK) FIXME("Call to GetIndices failed\n");
*ppIndexData = NULL;
diff --git a/dlls/wined3d/device.c b/dlls/wined3d/device.c
index 597fcac..375d57e 100644
--- a/dlls/wined3d/device.c
+++ b/dlls/wined3d/device.c
@@ -3244,7 +3244,9 @@ static HRESULT WINAPI IWineD3DDeviceImpl
*ppIndexData = This->stateBlock->pIndexData;
+ /* up ref count on ppindexdata */
if (*ppIndexData) {
+ IWineD3DIndexBuffer_AddRef(*ppIndexData);
*pBaseVertexIndex = This->stateBlock->baseVertexIndex;
TRACE("(%p) index data set to %p + %u\n", This, ppIndexData, This->stateBlock->baseVertexIndex);
}else{
More information about the wine-cvs
mailing list