Author: greatlrd Date: Tue Oct 23 01:15:10 2007 New Revision: 29798
URL: http://svn.reactos.org/svn/reactos?rev=29798&view=rev Log: actvate more code and slash away more notes to the trachcan, and smaller cleanup
Modified: branches/reactx/reactos/drivers/directx/directory.rbuild branches/reactx/reactos/drivers/directx/dxg/dxg.rbuild branches/reactx/reactos/drivers/directx/dxg/main.c
Modified: branches/reactx/reactos/drivers/directx/directory.rbuild URL: http://svn.reactos.org/svn/reactos/branches/reactx/reactos/drivers/directx/d... ============================================================================== --- branches/reactx/reactos/drivers/directx/directory.rbuild (original) +++ branches/reactx/reactos/drivers/directx/directory.rbuild Tue Oct 23 01:15:10 2007 @@ -4,4 +4,7 @@ <directory name="dxg"> <xi:include href="dxg/dxg.rbuild" /> </directory> +<directory name="dxgthk"> + <xi:include href="dxgthk/dxgthk.rbuild" /> +</directory> </group>
Modified: branches/reactx/reactos/drivers/directx/dxg/dxg.rbuild URL: http://svn.reactos.org/svn/reactos/branches/reactx/reactos/drivers/directx/d... ============================================================================== --- branches/reactx/reactos/drivers/directx/dxg/dxg.rbuild (original) +++ branches/reactx/reactos/drivers/directx/dxg/dxg.rbuild Tue Oct 23 01:15:10 2007 @@ -5,6 +5,7 @@ <importlibrary definition="dxg.def" /> <include base="dxg">.</include> <define name="__USE_W32API" /> + <library>dxgthk</library> <file>main.c</file> <file>dxg.rc</file> </module>
Modified: branches/reactx/reactos/drivers/directx/dxg/main.c URL: http://svn.reactos.org/svn/reactos/branches/reactx/reactos/drivers/directx/d... ============================================================================== --- branches/reactx/reactos/drivers/directx/dxg/main.c (original) +++ branches/reactx/reactos/drivers/directx/dxg/main.c Tue Oct 23 01:15:10 2007 @@ -12,14 +12,18 @@
#include <dxg_int.h>
-ULONG gcDxgFuncs = 0x5C; + ULONG gcMaxDdHmgr = 0; ULONG gcSizeDdHmgr = 0; -gcDummyPageRefCnt = 0; +LONG gcDummyPageRefCnt = 0; +HSEMAPHORE ghsemHmgr = NULL; +HSEMAPHORE ghsemDummyPage = NULL; +VOID *gpDummyPage = NULL; +PEPROCESS gpepSession = NULL;
-HSEMAPHORE *ghsemHmgr = NULL; -VOID * gpDummyPage; +PDRVFN gpEngFuncs;
+const ULONG gcDxgFuncs = DXG_INDEX_DxDdIoctl + 1; DRVFN gaDxgFuncs [] = { {0, (PFN) NULL} @@ -46,6 +50,7 @@ {
PDRVFN drv_func; + INT i;
/* Test see if the data is vaild we got from win32k.sys */ if ((SizeEngDrv != sizeof(DRVENABLEDATA)) || @@ -55,9 +60,9 @@ }
/* rest static value */ - gpDummyPage = 0; + gpDummyPage = NULL; gcDummyPageRefCnt = 0; - ghsemDummyPage = 0; + ghsemDummyPage = NULL;
/* * Setup internal driver functions list we got from dxg driver functions list @@ -71,7 +76,7 @@ { return STATUS_INTERNAL_ERROR; } -#if 0 + /* * Check if all drv functions are sorted right * and if it really are exported @@ -79,7 +84,7 @@
for (i=1 ; i < DXENG_INDEX_DxEngLoadImage + 1; i++) { - drv_func = &EngDrv->pdrvfn[i]; + drv_func = &pDxEngDrv->pdrvfn[i];
if ((drv_func->iFunc != i) || (drv_func->pfn == 0)) @@ -93,6 +98,7 @@ /* Note 12/1-2004 : Why is this set to 0x618 */ *DirectDrawContext = 0x618;
+#if 0 if (DdHmgCreate()) { ghsemDummyPage = EngCreateSemaphore(); @@ -103,6 +109,7 @@ return STATUS_SUCCESS; } } +#endif
DdHmgDestroy();
@@ -111,37 +118,39 @@ EngDeleteSemaphore(ghsemDummyPage); ghsemDummyPage = 0; } -#endif + return STATUS_NO_MEMORY; }
NTSTATUS DxDdCleanupDxGraphics() { -#if 0 + DdHmgDestroy();
if (!ghsemDummyPage) { if (!gpDummyPage) { +#if 0 ExFreePoolWithTag(gpDummyPage,0); - gpDummyPage = 0; +#endif + gpDummyPage = NULL; gcDummyPageRefCnt = 0; } - EngDeleteSemaphore(ghsemDummyPage) + EngDeleteSemaphore(ghsemDummyPage); } -#endif + return 0; }
BOOL DdHmgDestroy() { + gcMaxDdHmgr = 0; + gcSizeDdHmgr = 0; #if 0 ghFreeDdHmgr = 0; - gcMaxDdHmgr = 0; - gcSizeDdHmgr = 0; gpentDdHmgrLast = 0;
if (gpentDdHmgr) @@ -149,12 +158,13 @@ EngFreeMem(gpentDdHmgr); gpentDdHmgr = 0; } - +#endif if (ghsemHmgr) { EngDeleteSemaphore(ghsemHmgr); + ghsemHmgr = NULL; } -#endif + return TRUE; }