mirror of
https://github.com/reactos/reactos.git
synced 2025-02-24 17:34:57 +00:00
Implement Main_DDrawSurface_EnumAttachedSurfaces after wine desgin of it
we need rewrite Createsurface and Implement AttahedSurface Thanks to wine code and some wine devloper to expain how it works I got one more directx sdk sample working parlty with this change. svn path=/trunk/; revision=23287
This commit is contained in:
parent
0b21a745a5
commit
21f9a961c8
1 changed files with 37 additions and 1 deletions
|
@ -190,9 +190,45 @@ Main_DDrawSurface_EnumAttachedSurfaces(LPDIRECTDRAWSURFACE7 iface,
|
|||
LPVOID context,
|
||||
LPDDENUMSURFACESCALLBACK7 cb)
|
||||
{
|
||||
IDirectDrawSurfaceImpl* This = (IDirectDrawSurfaceImpl*)iface;
|
||||
IDirectDrawSurfaceImpl *surf;
|
||||
DDSURFACEDESC2 desc;
|
||||
|
||||
DX_WINDBG_trace();
|
||||
|
||||
DX_STUB;
|
||||
/*
|
||||
Wine Code from wine cvs 27/7-2006
|
||||
with small changes to fith into our ddraw desgin
|
||||
*/
|
||||
|
||||
if(cb == NULL)
|
||||
{
|
||||
return DDERR_INVALIDPARAMS;
|
||||
}
|
||||
|
||||
for (surf = (IDirectDrawSurfaceImpl*)This->Surf->next_complex; surf != NULL; surf = (IDirectDrawSurfaceImpl*)surf->Surf->next_complex)
|
||||
{
|
||||
Main_DDrawSurface_AddRef((LPDIRECTDRAWSURFACE7)surf);
|
||||
desc = surf->Surf->mddsdPrimary;
|
||||
/* check: != DDENUMRET_OK or == DDENUMRET_CANCEL? */
|
||||
if (cb((LPDIRECTDRAWSURFACE7)surf, &desc, context) == DDENUMRET_CANCEL)
|
||||
{
|
||||
return DD_OK;
|
||||
}
|
||||
}
|
||||
|
||||
for (surf = (IDirectDrawSurfaceImpl*)This->Surf->next_attached; surf != NULL; surf = (IDirectDrawSurfaceImpl*)surf->Surf->next_attached)
|
||||
{
|
||||
Main_DDrawSurface_AddRef((LPDIRECTDRAWSURFACE7)surf);
|
||||
desc = surf->Surf->mddsdPrimary;
|
||||
/* check: != DDENUMRET_OK or == DDENUMRET_CANCEL? */
|
||||
if (cb((LPDIRECTDRAWSURFACE7)surf, &desc, context) == DDENUMRET_CANCEL)
|
||||
{
|
||||
return DD_OK;
|
||||
}
|
||||
}
|
||||
|
||||
return DD_OK;
|
||||
}
|
||||
|
||||
HRESULT WINAPI
|
||||
|
|
Loading…
Reference in a new issue