Author: gbrunmar
Date: Wed May 7 13:23:46 2008
New Revision: 33349
URL:
http://svn.reactos.org/svn/reactos?rev=33349&view=rev
Log:
Implemented IDirect3DDevice9::GetCreationParameters()
Modified:
trunk/reactos/dll/directx/d3d9/d3d9_device.c
Modified: trunk/reactos/dll/directx/d3d9/d3d9_device.c
URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/dll/directx/d3d9/d3d9_devi…
==============================================================================
--- trunk/reactos/dll/directx/d3d9/d3d9_device.c [iso-8859-1] (original)
+++ trunk/reactos/dll/directx/d3d9/d3d9_device.c [iso-8859-1] Wed May 7 13:23:46 2008
@@ -239,10 +239,43 @@
return D3D_OK;
}
-static HRESULT WINAPI IDirect3DDevice9Impl_GetCreationParameters(LPDIRECT3DDEVICE9 iface,
D3DDEVICE_CREATION_PARAMETERS *pParameters)
-{
- UNIMPLEMENTED
-
+/*++
+* @name IDirect3DDevice9::GetCreationParameters
+* @implemented
+*
+* The function IDirect3DDevice9Impl_GetCreationParameters fills the pParameters argument
with the
+* parameters the device was created with.
+*
+* @param LPDIRECT3D iface
+* Pointer to the IDirect3D9 object returned from Direct3DCreate9()
+*
+* @param D3DDEVICE_CREATION_PARAMETERS* pParameters
+* Pointer to a D3DDEVICE_CREATION_PARAMETERS structure to be filled with the creation
parameter
+* information for this device.
+*
+* @return HRESULT
+* If the method successfully fills the pParameters structure, the return value is
D3D_OK.
+* If pParameters is a bad pointer, the return value will be D3DERR_INVALIDCALL.
+*
+*/
+static HRESULT WINAPI IDirect3DDevice9Impl_GetCreationParameters(LPDIRECT3DDEVICE9 iface,
D3DDEVICE_CREATION_PARAMETERS* pParameters)
+{
+ LPDIRECT3DDEVICE9_INT This = impl_from_IDirect3DDevice9(iface);
+ LOCK_D3DDEVICE9();
+
+ if (IsBadWritePtr(pParameters, sizeof(D3DDEVICE_CREATION_PARAMETERS)))
+ {
+ DPRINT1("Invalid pParameters parameter specified");
+ UNLOCK_D3DDEVICE9();
+ return D3DERR_INVALIDCALL;
+ }
+
+ pParameters->AdapterOrdinal = This->AdapterIndexInGroup[0];
+ pParameters->DeviceType = This->DeviceType;
+ pParameters->hFocusWindow = This->hWnd;
+ pParameters->BehaviorFlags = This->BehaviourFlags;
+
+ UNLOCK_D3DDEVICE9();
return D3D_OK;
}