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];
|
DRVFN gpDxFuncs[DXG_INDEX_DxDdIoctl];
|
||||||
HANDLE ghDxGraphics = NULL;
|
HANDLE ghDxGraphics = NULL;
|
||||||
ULONG gdwDirectDrawContext;
|
ULONG gdwDirectDrawContext;
|
||||||
|
EDD_DIRECTDRAW_GLOBAL eDdirectDraw_Global;
|
||||||
|
|
||||||
|
|
||||||
/************************************************************************/
|
/************************************************************************/
|
||||||
|
@ -154,7 +155,8 @@ NtGdiDdCreateDirectDrawObject(HDC hdc)
|
||||||
PGD_DDCREATEDIRECTDRAWOBJECT pfnDdCreateDirectDrawObject;
|
PGD_DDCREATEDIRECTDRAWOBJECT pfnDdCreateDirectDrawObject;
|
||||||
NTSTATUS Status;
|
NTSTATUS Status;
|
||||||
PEPROCESS Proc = NULL;
|
PEPROCESS Proc = NULL;
|
||||||
|
PDC pDC;
|
||||||
|
|
||||||
if (hdc == NULL)
|
if (hdc == NULL)
|
||||||
{
|
{
|
||||||
DPRINT1("Warning : hdc is NULL\n");
|
DPRINT1("Warning : hdc is NULL\n");
|
||||||
|
@ -170,12 +172,25 @@ NtGdiDdCreateDirectDrawObject(HDC hdc)
|
||||||
return 0;
|
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 */
|
/* get the pfnDdCreateDirectDrawObject after we load the drv */
|
||||||
pfnDdCreateDirectDrawObject = (PGD_DDCREATEDIRECTDRAWOBJECT)gpDxFuncs[DXG_INDEX_DxDdCreateDirectDrawObject].pfn;
|
pfnDdCreateDirectDrawObject = (PGD_DDCREATEDIRECTDRAWOBJECT)gpDxFuncs[DXG_INDEX_DxDdCreateDirectDrawObject].pfn;
|
||||||
|
|
||||||
if (pfnDdCreateDirectDrawObject == NULL)
|
if (pfnDdCreateDirectDrawObject == NULL)
|
||||||
{
|
{
|
||||||
DPRINT1("Warning: no pfnDdCreateDirectDrawObject\n");
|
DPRINT1("Warning: no pfnDdCreateDirectDrawObject\n");
|
||||||
return DDHAL_DRIVER_NOTHANDLED;
|
return DDHAL_DRIVER_NOTHANDLED;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue