Commit 9240bc3f authored by Jason Edmeades's avatar Jason Edmeades Committed by Alexandre Julliard

Various fixes, typos corrected and clarifying trace points.

parent dcb44969
......@@ -286,7 +286,8 @@ struct IDirect3DDevice8Impl
/* IDirect3DDevice8 fields */
IDirect3D8Impl *direct3d8;
IDirect3DSurface8Impl *backBuffer;
D3DPRESENT_PARAMETERS PresentParms;
D3DPRESENT_PARAMETERS PresentParms;
D3DDEVICE_CREATION_PARAMETERS CreateParms;
UINT adapterNo;
D3DDEVTYPE devType;
......
......@@ -398,6 +398,13 @@ HRESULT WINAPI IDirect3D8Impl_CreateDevice (LPDIRECT3D8 iface,
object->ref = 1;
object->direct3d8 = This;
object->UpdateStateBlock = &object->StateBlock;
/* Save the creation parameters */
object->CreateParms.AdapterOrdinal = Adapter;
object->CreateParms.DeviceType = DeviceType;
object->CreateParms.hFocusWindow = hFocusWindow;
object->CreateParms.BehaviorFlags = BehaviourFlags;
CreateStateBlock((LPDIRECT3DDEVICE8) object);
*ppReturnedDeviceInterface = (LPDIRECT3DDEVICE8)object;
......
......@@ -66,6 +66,11 @@ HRESULT WINAPI IDirect3DSurface8Impl_GetDevice(LPDIRECT3DSURFACE8 iface, IDirect
ICOM_THIS(IDirect3DSurface8Impl,iface);
TRACE("(%p) : returning %p\n", This, This->Device);
*ppDevice = (LPDIRECT3DDEVICE8) This->Device;
/* Note Calling this method will increase the internal reference count
on the IDirect3DDevice8 interface. */
IDirect3DDevice8Impl_AddRef(*ppDevice);
return D3D_OK;
}
HRESULT WINAPI IDirect3DSurface8Impl_SetPrivateData(LPDIRECT3DSURFACE8 iface, REFGUID refguid,CONST void* pData,DWORD SizeOfData,DWORD Flags) {
......@@ -82,6 +87,10 @@ HRESULT WINAPI IDirect3DSurface8Impl_FreePrivateData(LPDIRECT3DSURFACE8 iface, R
}
HRESULT WINAPI IDirect3DSurface8Impl_GetContainer(LPDIRECT3DSURFACE8 iface, REFIID riid,void** ppContainer) {
ICOM_THIS(IDirect3DSurface8Impl,iface);
/* If the surface is created using CreateImageSurface, CreateRenderTarget,
or CreateDepthStencilSurface, the surface is considered stand alone. In this case,
GetContainer will return the Direct3D device used to create the surface. */
TRACE("(%p) : returning %p\n", This, This->Container);
*ppContainer = This->Container;
return D3D_OK;
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment