Added traces in GetPrivateData and SetPrivateData.
Made SetPrivateData actually store the data from the buffer as well as its size.
This commit is contained in:
parent
7016b99972
commit
9593c4ea16
|
@ -1000,6 +1000,8 @@ Main_DirectDrawSurface_GetPrivateData(LPDIRECTDRAWSURFACE7 iface,
|
||||||
IDirectDrawSurfaceImpl *This = (IDirectDrawSurfaceImpl *)iface;
|
IDirectDrawSurfaceImpl *This = (IDirectDrawSurfaceImpl *)iface;
|
||||||
PrivateData* data;
|
PrivateData* data;
|
||||||
|
|
||||||
|
TRACE("(%p)->(%p), size = %ld\n", This, pBuffer, *pcbBufferSize);
|
||||||
|
|
||||||
data = find_private_data(This, tag);
|
data = find_private_data(This, tag);
|
||||||
if (data == NULL) return DDERR_NOTFOUND;
|
if (data == NULL) return DDERR_NOTFOUND;
|
||||||
|
|
||||||
|
@ -1370,6 +1372,8 @@ Main_DirectDrawSurface_SetPrivateData(LPDIRECTDRAWSURFACE7 iface,
|
||||||
PrivateData* data;
|
PrivateData* data;
|
||||||
IDirectDrawSurfaceImpl *This = (IDirectDrawSurfaceImpl *)iface;
|
IDirectDrawSurfaceImpl *This = (IDirectDrawSurfaceImpl *)iface;
|
||||||
|
|
||||||
|
TRACE("(%p)->(%p), size=%ld\n", This, pData, cbSize);
|
||||||
|
|
||||||
data = find_private_data(This, tag);
|
data = find_private_data(This, tag);
|
||||||
if (data == NULL)
|
if (data == NULL)
|
||||||
{
|
{
|
||||||
|
@ -1394,6 +1398,9 @@ Main_DirectDrawSurface_SetPrivateData(LPDIRECTDRAWSURFACE7 iface,
|
||||||
HeapFree(GetProcessHeap(), 0, data);
|
HeapFree(GetProcessHeap(), 0, data);
|
||||||
return DDERR_OUTOFMEMORY;
|
return DDERR_OUTOFMEMORY;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
data->size = cbSize;
|
||||||
|
memcpy(data->ptr.data, pData, data->size);
|
||||||
}
|
}
|
||||||
|
|
||||||
/* link it in */
|
/* link it in */
|
||||||
|
@ -1412,6 +1419,7 @@ Main_DirectDrawSurface_SetPrivateData(LPDIRECTDRAWSURFACE7 iface,
|
||||||
* guarantee SetPrivateData working when using LPUNKNOWN or data
|
* guarantee SetPrivateData working when using LPUNKNOWN or data
|
||||||
* that is no larger than the old data. */
|
* that is no larger than the old data. */
|
||||||
|
|
||||||
|
FIXME("Replacing existing private data not implemented yet.\n");
|
||||||
return E_FAIL;
|
return E_FAIL;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue