Author: greatlrd
Date: Sat Apr 8 02:18:17 2006
New Revision: 21514
URL:
http://svn.reactos.ru/svn/reactos?rev=21514&view=rev
Log:
1. Implement Surface_GetCaps
2. Implement AddAttachedSurface not tested
Modified:
trunk/reactos/dll/directx/ddraw/main/surface_main.c
Modified: trunk/reactos/dll/directx/ddraw/main/surface_main.c
URL:
http://svn.reactos.ru/svn/reactos/trunk/reactos/dll/directx/ddraw/main/surf…
==============================================================================
--- trunk/reactos/dll/directx/ddraw/main/surface_main.c (original)
+++ trunk/reactos/dll/directx/ddraw/main/surface_main.c Sat Apr 8 02:18:17 2006
@@ -82,7 +82,18 @@
Main_DDrawSurface_AddAttachedSurface(LPDIRECTDRAWSURFACE7 iface,
LPDIRECTDRAWSURFACE7 pAttach)
{
- DX_STUB;
+ IDirectDrawSurfaceImpl* This = (IDirectDrawSurfaceImpl*)iface;
+
+
+ IDirectDrawSurfaceImpl* That = NULL;
+ if (pAttach==NULL)
+ {
+ return DDERR_INVALIDOBJECT;
+ }
+ That = (IDirectDrawSurfaceImpl*)pAttach;
+
+ //FIXME Have I put This and That in right order ?? DdAttachSurface(from, to)
+ return DdAttachSurface(
That->Surf->mpPrimaryLocals[0],This->Surf->mpPrimaryLocals[0]);
}
/* MSDN: "not currently implemented." */
@@ -176,7 +187,24 @@
HRESULT WINAPI
Main_DDrawSurface_GetCaps(LPDIRECTDRAWSURFACE7 iface, LPDDSCAPS2 pCaps)
{
- DX_STUB;
+ IDirectDrawSurfaceImpl* This;
+
+ if (iface == NULL)
+ {
+ return DDERR_INVALIDOBJECT;
+ }
+
+ if (pCaps == NULL)
+ {
+ return DDERR_INVALIDPARAMS;
+ }
+
+ This = (IDirectDrawSurfaceImpl*)iface;
+
+ RtlZeroMemory(pCaps,sizeof(DDSCAPS2));
+ pCaps->dwCaps = This->Surf->mddsdPrimary.ddsCaps.dwCaps;
+
+ return DD_OK;
}
HRESULT WINAPI