Author: gbrunmar
Date: Thu Dec 18 13:48:17 2008
New Revision: 38177
URL:
http://svn.reactos.org/svn/reactos?rev=38177&view=rev
Log:
Implemented IDirect3DDevice9::GetRasterStatus()
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] Thu Dec 18 13:48:17 2008
@@ -486,31 +486,12 @@
return D3D_OK;
}
-HRESULT WINAPI IDirect3DDevice9Base_GetRasterStatus(LPDIRECT3DDEVICE9 iface, UINT
iSwapChain, D3DRASTER_STATUS* pRasterStatus)
-{
- UNIMPLEMENTED
-
- return D3D_OK;
-}
-
-HRESULT WINAPI IDirect3DDevice9Base_SetDialogBoxMode(LPDIRECT3DDEVICE9 iface, BOOL
bEnableDialogs)
-{
- UNIMPLEMENTED
-
- return D3D_OK;
-}
-
-VOID WINAPI IDirect3DDevice9Base_SetGammaRamp(LPDIRECT3DDEVICE9 iface, UINT iSwapChain,
DWORD Flags, CONST D3DGAMMARAMP* pRamp)
-{
- UNIMPLEMENTED
-}
-
-/*++
-* @name IDirect3DDevice9::GetGammaRamp
-* @implemented
-*
-* The function IDirect3DDevice9Base_GetGammaRamp retrieves the gamma correction ramp
values
-* for the specified swap chain.
+/*++
+* @name IDirect3DDevice9::GetRasterStatus
+* @implemented
+*
+* The function IDirect3DDevice9Base_GetRasterStatus retrieves raster information
+* of the monitor for the specified swap chain.
*
* @param LPDIRECT3D iface
* Pointer to the IDirect3DDevice9 object returned from IDirect3D9::CreateDevice().
@@ -519,6 +500,64 @@
* Swap chain index to get object for.
* The maximum value for this is the value returned by
IDirect3DDevice9::GetNumberOfSwapChains() - 1.
*
+* @param D3DRASTER_STATUS* pRasterStatus
+* Pointer to a D3DRASTER_STATUS to receive the raster information
+*
+*/
+HRESULT WINAPI IDirect3DDevice9Base_GetRasterStatus(LPDIRECT3DDEVICE9 iface, UINT
iSwapChain, D3DRASTER_STATUS* pRasterStatus)
+{
+ HRESULT hResult;
+ IDirect3DSwapChain9* pSwapChain = NULL;
+ LPDIRECT3DDEVICE9_INT This = IDirect3DDevice9ToImpl(iface);
+ LOCK_D3DDEVICE9();
+
+ IDirect3DDevice9Base_GetSwapChain(iface, iSwapChain, &pSwapChain);
+ if (NULL == pSwapChain)
+ {
+ DPRINT1("Invalid iSwapChain parameter specified");
+ UNLOCK_D3DDEVICE9();
+ return D3DERR_INVALIDCALL;
+ }
+
+ if (NULL == pRasterStatus)
+ {
+ DPRINT1("Invalid pRasterStatus parameter specified");
+ UNLOCK_D3DDEVICE9();
+ return D3DERR_INVALIDCALL;
+ }
+
+ hResult = IDirect3DSwapChain9_GetRasterStatus(pSwapChain, pRasterStatus);
+
+ UNLOCK_D3DDEVICE9();
+ return hResult;
+}
+
+HRESULT WINAPI IDirect3DDevice9Base_SetDialogBoxMode(LPDIRECT3DDEVICE9 iface, BOOL
bEnableDialogs)
+{
+ UNIMPLEMENTED
+
+ return D3D_OK;
+}
+
+VOID WINAPI IDirect3DDevice9Base_SetGammaRamp(LPDIRECT3DDEVICE9 iface, UINT iSwapChain,
DWORD Flags, CONST D3DGAMMARAMP* pRamp)
+{
+ UNIMPLEMENTED
+}
+
+/*++
+* @name IDirect3DDevice9::GetGammaRamp
+* @implemented
+*
+* The function IDirect3DDevice9Base_GetGammaRamp retrieves the gamma correction ramp
values
+* for the specified swap chain.
+*
+* @param LPDIRECT3D iface
+* Pointer to the IDirect3DDevice9 object returned from IDirect3D9::CreateDevice().
+*
+* @param UINT iSwapChain
+* Swap chain index to get object for.
+* The maximum value for this is the value returned by
IDirect3DDevice9::GetNumberOfSwapChains() - 1.
+*
* @param D3DGAMMARAMP* pRamp
* Pointer to a D3DGAMMARAMP to receive the gamma correction ramp values.
*