wined3d: Add the WINED3DSPD_IUNKNOWN flag and use it.

This commit is contained in:
H. Verbeet 2007-02-15 13:32:00 +01:00 committed by Alexandre Julliard
parent 176a2a19c3
commit e8419403ee
2 changed files with 7 additions and 4 deletions

View File

@ -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);

View File

@ -1562,4 +1562,7 @@ typedef enum _WINED3DSURFTYPE {
#define WINED3DSTREAMSOURCE_INDEXEDDATA (1 << 30)
#define WINED3DSTREAMSOURCE_INSTANCEDATA (2 << 30)
/* SetPrivateData flags */
#define WINED3DSPD_IUNKNOWN 0x00000001
#endif