Author: greatlrd
Date: Sat Apr 19 17:11:39 2008
New Revision: 33039
URL: http://svn.reactos.org/svn/reactos?rev=33039&view=rev
Log:
do not assert if DPRINT1("Object->cExclusiveLock = %d\n", Object->cExclusiveLock);
this can happen in ms dxg.sys for it can lock same dc twice or more.
then call to unlock it equal many times.
Modified:
trunk/reactos/subsystems/win32/win32k/objects/gdiobj.c
Modified: trunk/reactos/subsystems/win32/win32k/objects/gdiobj.c
URL: http://svn.reactos.org/svn/reactos/trunk/reactos/subsystems/win32/win32k/ob…
==============================================================================
--- trunk/reactos/subsystems/win32/win32k/objects/gdiobj.c [iso-8859-1] (original)
+++ trunk/reactos/subsystems/win32/win32k/objects/gdiobj.c [iso-8859-1] Sat Apr 19 17:11:39 2008
@@ -692,7 +692,8 @@
DPRINT1("Object->cExclusiveLock = %d\n", Object->cExclusiveLock);
GDIDBG_TRACECALLER();
GDIDBG_TRACELOCKER(GDI_HANDLE_GET_INDEX(hObj));
- ASSERT(FALSE);
+ /* do not assert here for it will call again from dxg.sys it being call twice */
+ //ASSERT(FALSE);
}
}
else
Author: greatlrd
Date: Sat Apr 19 15:50:39 2008
New Revision: 33037
URL: http://svn.reactos.org/svn/reactos?rev=33037&view=rev
Log:
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.
Modified:
trunk/reactos/subsystems/win32/win32k/ntddraw/ddraw.c
Modified: trunk/reactos/subsystems/win32/win32k/ntddraw/ddraw.c
URL: http://svn.reactos.org/svn/reactos/trunk/reactos/subsystems/win32/win32k/nt…
==============================================================================
--- trunk/reactos/subsystems/win32/win32k/ntddraw/ddraw.c [iso-8859-1] (original)
+++ trunk/reactos/subsystems/win32/win32k/ntddraw/ddraw.c [iso-8859-1] Sat Apr 19 15:50:39 2008
@@ -21,6 +21,7 @@
DRVFN gpDxFuncs[DXG_INDEX_DxDdIoctl];
HANDLE ghDxGraphics = NULL;
ULONG gdwDirectDrawContext;
+EDD_DIRECTDRAW_GLOBAL eDdirectDraw_Global;
/************************************************************************/
@@ -154,7 +155,8 @@
PGD_DDCREATEDIRECTDRAWOBJECT pfnDdCreateDirectDrawObject;
NTSTATUS Status;
PEPROCESS Proc = NULL;
-
+ PDC pDC;
+
if (hdc == NULL)
{
DPRINT1("Warning : hdc is NULL\n");
@@ -170,12 +172,25 @@
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;
if (pfnDdCreateDirectDrawObject == NULL)
{
- DPRINT1("Warning: no pfnDdCreateDirectDrawObject\n");
+ DPRINT1("Warning: no pfnDdCreateDirectDrawObject\n");
return DDHAL_DRIVER_NOTHANDLED;
}