mirror of
https://github.com/reactos/reactos.git
synced 2025-02-24 01:15:09 +00:00
cleanup NtGdiDdCreateSurface
we can now create a surface from DdCreateSurface. svn path=/trunk/; revision=23164
This commit is contained in:
parent
5483a9b9dc
commit
f2f19d2e9a
1 changed files with 19 additions and 29 deletions
|
@ -344,42 +344,32 @@ DWORD STDCALL NtGdiDdCreateSurface(
|
||||||
DWORD ddRVal = DDHAL_DRIVER_NOTHANDLED;
|
DWORD ddRVal = DDHAL_DRIVER_NOTHANDLED;
|
||||||
PDD_DIRECTDRAW pDirectDraw;
|
PDD_DIRECTDRAW pDirectDraw;
|
||||||
PDD_DIRECTDRAW_GLOBAL lgpl;
|
PDD_DIRECTDRAW_GLOBAL lgpl;
|
||||||
#ifdef DX_DEBUG
|
|
||||||
DPRINT1("NtGdiDdCreateSurface\n");
|
DPRINT1("NtGdiDdCreateSurface\n");
|
||||||
#endif
|
|
||||||
|
|
||||||
pDirectDraw = GDIOBJ_LockObj(DdHandleTable, hDirectDrawLocal, GDI_OBJECT_TYPE_DIRECTDRAW);
|
pDirectDraw = GDIOBJ_LockObj(DdHandleTable, hDirectDrawLocal, GDI_OBJECT_TYPE_DIRECTDRAW);
|
||||||
if (pDirectDraw == NULL)
|
|
||||||
{
|
|
||||||
#ifdef DX_DEBUG
|
|
||||||
DPRINT1("Can not lock the DirectDraw handle\n");
|
|
||||||
#endif
|
|
||||||
return DDHAL_DRIVER_NOTHANDLED;
|
|
||||||
}
|
|
||||||
|
|
||||||
/* backup the orignal PDev and info */
|
|
||||||
lgpl = puCreateSurfaceData->lpDD;
|
|
||||||
|
|
||||||
/* use our cache version instead */
|
if (pDirectDraw != NULL)
|
||||||
puCreateSurfaceData->lpDD = &pDirectDraw->Global;
|
{
|
||||||
|
|
||||||
/* make the call */
|
if ((pDirectDraw->DD.dwFlags & DDHAL_CB32_CREATESURFACE))
|
||||||
if (!(pDirectDraw->DD.dwFlags & DDHAL_CB32_CANCREATESURFACE))
|
{
|
||||||
{
|
/* backup the orignal PDev and info */
|
||||||
#ifdef DX_DEBUG
|
lgpl = puCreateSurfaceData->lpDD;
|
||||||
DPRINT1("DirectDraw HAL does not support Create Surface");
|
|
||||||
#endif
|
/* use our cache version instead */
|
||||||
ddRVal = DDHAL_DRIVER_NOTHANDLED;
|
puCreateSurfaceData->lpDD = &pDirectDraw->Global;
|
||||||
}
|
|
||||||
else
|
/* make the call */
|
||||||
{
|
ddRVal = pDirectDraw->DD.CreateSurface(puCreateSurfaceData);
|
||||||
ddRVal = pDirectDraw->DD.CreateSurface(puCreateSurfaceData);
|
|
||||||
|
/* But back the orignal PDev */
|
||||||
|
puCreateSurfaceData->lpDD = lgpl;
|
||||||
|
}
|
||||||
|
|
||||||
|
GDIOBJ_UnlockObjByPtr(DdHandleTable, pDirectDraw);
|
||||||
}
|
}
|
||||||
|
|
||||||
/* But back the orignal PDev */
|
|
||||||
puCreateSurfaceData->lpDD = lgpl;
|
|
||||||
|
|
||||||
GDIOBJ_UnlockObjByPtr(DdHandleTable, pDirectDraw);
|
|
||||||
return ddRVal;
|
return ddRVal;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue