mirror of
https://github.com/reactos/reactos.git
synced 2024-10-04 08:25:53 +00:00
add tempory hack for alloc EDD_DIRECTDRAW_GLOBAL for win32k.
this should be done for each drv, not a global for whole win32k it is only gobal for that drv, then we set the pointer to each hdc that is how it should be done. svn path=/trunk/; revision=33037
This commit is contained in:
parent
17f59814cf
commit
e79132f96d
|
@ -21,6 +21,7 @@ extern ULONG gcEngFuncs;
|
|||
DRVFN gpDxFuncs[DXG_INDEX_DxDdIoctl];
|
||||
HANDLE ghDxGraphics = NULL;
|
||||
ULONG gdwDirectDrawContext;
|
||||
EDD_DIRECTDRAW_GLOBAL eDdirectDraw_Global;
|
||||
|
||||
|
||||
/************************************************************************/
|
||||
|
@ -154,6 +155,7 @@ NtGdiDdCreateDirectDrawObject(HDC hdc)
|
|||
PGD_DDCREATEDIRECTDRAWOBJECT pfnDdCreateDirectDrawObject;
|
||||
NTSTATUS Status;
|
||||
PEPROCESS Proc = NULL;
|
||||
PDC pDC;
|
||||
|
||||
if (hdc == NULL)
|
||||
{
|
||||
|
@ -170,6 +172,19 @@ NtGdiDdCreateDirectDrawObject(HDC hdc)
|
|||
return 0;
|
||||
}
|
||||
|
||||
/* FIXME this code should be add where the driver being load */
|
||||
pDC = DC_LockDc(hdc);
|
||||
if (pDC == NULL)
|
||||
{
|
||||
DPRINT1("Warning : Failed to lock hdc\n");
|
||||
return 0;
|
||||
}
|
||||
/* FIXME This should be alloc for each drv and use it from each drv, not global for whole win32k */
|
||||
((PGDIDEVICE)pDC->pPDev)->pEDDgpl = &eDdirectDraw_Global;
|
||||
RtlZeroMemory(&eDdirectDraw_Global,sizeof(EDD_DIRECTDRAW_GLOBAL));
|
||||
DC_UnlockDc(pDC);
|
||||
|
||||
|
||||
/* get the pfnDdCreateDirectDrawObject after we load the drv */
|
||||
pfnDdCreateDirectDrawObject = (PGD_DDCREATEDIRECTDRAWOBJECT)gpDxFuncs[DXG_INDEX_DxDdCreateDirectDrawObject].pfn;
|
||||
|
||||
|
|
Loading…
Reference in a new issue