From 9593c4ea1673ef000a3f4c6c02399d57e503a99a Mon Sep 17 00:00:00 2001 From: Antoine Chavasse Date: Mon, 23 May 2005 11:42:40 +0000 Subject: [PATCH] Added traces in GetPrivateData and SetPrivateData. Made SetPrivateData actually store the data from the buffer as well as its size. --- dlls/ddraw/dsurface/main.c | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/dlls/ddraw/dsurface/main.c b/dlls/ddraw/dsurface/main.c index 9165ba02a74..a33e27be13b 100644 --- a/dlls/ddraw/dsurface/main.c +++ b/dlls/ddraw/dsurface/main.c @@ -1000,6 +1000,8 @@ Main_DirectDrawSurface_GetPrivateData(LPDIRECTDRAWSURFACE7 iface, IDirectDrawSurfaceImpl *This = (IDirectDrawSurfaceImpl *)iface; PrivateData* data; + TRACE("(%p)->(%p), size = %ld\n", This, pBuffer, *pcbBufferSize); + data = find_private_data(This, tag); if (data == NULL) return DDERR_NOTFOUND; @@ -1370,6 +1372,8 @@ Main_DirectDrawSurface_SetPrivateData(LPDIRECTDRAWSURFACE7 iface, PrivateData* data; IDirectDrawSurfaceImpl *This = (IDirectDrawSurfaceImpl *)iface; + TRACE("(%p)->(%p), size=%ld\n", This, pData, cbSize); + data = find_private_data(This, tag); if (data == NULL) { @@ -1394,6 +1398,9 @@ Main_DirectDrawSurface_SetPrivateData(LPDIRECTDRAWSURFACE7 iface, HeapFree(GetProcessHeap(), 0, data); return DDERR_OUTOFMEMORY; } + + data->size = cbSize; + memcpy(data->ptr.data, pData, data->size); } /* link it in */ @@ -1412,6 +1419,7 @@ Main_DirectDrawSurface_SetPrivateData(LPDIRECTDRAWSURFACE7 iface, * guarantee SetPrivateData working when using LPUNKNOWN or data * that is no larger than the old data. */ + FIXME("Replacing existing private data not implemented yet.\n"); return E_FAIL; } }