Module: wine Branch: master Commit: e8419403eec00e5eb3f3e059080e39c326b51a92 URL: http://source.winehq.org/git/wine.git/?a=commit;h=e8419403eec00e5eb3f3e05908...
Author: H. Verbeet hverbeet@gmail.com Date: Thu Feb 15 13:32:00 2007 +0100
wined3d: Add the WINED3DSPD_IUNKNOWN flag and use it.
---
dlls/wined3d/resource.c | 8 ++++---- include/wine/wined3d_types.h | 3 +++ 2 files changed, 7 insertions(+), 4 deletions(-)
diff --git a/dlls/wined3d/resource.c b/dlls/wined3d/resource.c index b65f50c..a463d82 100644 --- a/dlls/wined3d/resource.c +++ b/dlls/wined3d/resource.c @@ -115,7 +115,7 @@ HRESULT WINAPI IWineD3DResourceImpl_SetPrivateData(IWineD3DResource *iface, REFG #if 0 (*data)->uniquenessValue = This->uniquenessValue; #endif - if (Flags & D3DSPD_IUNKNOWN) { + if (Flags & WINED3DSPD_IUNKNOWN) { (*data)->ptr.object = (LPUNKNOWN)pData; (*data)->size = sizeof(LPUNKNOWN); IUnknown_AddRef((*data)->ptr.object); @@ -157,7 +157,7 @@ HRESULT WINAPI IWineD3DResourceImpl_GetPrivateData(IWineD3DResource *iface, REFG
#if 0 /* This may not be right. */ - if (((*data)->flags & D3DSPD_VOLATILE) + if (((*data)->flags & WINED3DSPD_VOLATILE) && (*data)->uniquenessValue != This->uniquenessValue) return DDERR_EXPIRED; #endif @@ -166,7 +166,7 @@ HRESULT WINAPI IWineD3DResourceImpl_GetPrivateData(IWineD3DResource *iface, REFG return WINED3DERR_MOREDATA; }
- if ((*data)->flags & D3DSPD_IUNKNOWN) { + if ((*data)->flags & WINED3DSPD_IUNKNOWN) { *(LPUNKNOWN *)pData = (*data)->ptr.object; IUnknown_AddRef((*data)->ptr.object); } @@ -187,7 +187,7 @@ HRESULT WINAPI IWineD3DResourceImpl_FreePrivateData(IWineD3DResource *iface, REF
*data = (*data)->next;
- if ((*data)->flags & D3DSPD_IUNKNOWN) + if ((*data)->flags & WINED3DSPD_IUNKNOWN) { if ((*data)->ptr.object != NULL) IUnknown_Release((*data)->ptr.object); diff --git a/include/wine/wined3d_types.h b/include/wine/wined3d_types.h index 38622ae..1421ddf 100644 --- a/include/wine/wined3d_types.h +++ b/include/wine/wined3d_types.h @@ -1562,4 +1562,7 @@ typedef enum _WINED3DSURFTYPE { #define WINED3DSTREAMSOURCE_INDEXEDDATA (1 << 30) #define WINED3DSTREAMSOURCE_INSTANCEDATA (2 << 30)
+/* SetPrivateData flags */ +#define WINED3DSPD_IUNKNOWN 0x00000001 + #endif