Author: greatlrd
Date: Fri Dec 28 23:32:30 2007
New Revision: 31481
URL:
http://svn.reactos.org/svn/reactos?rev=31481&view=rev
Log:
small bugfix in DxDdCleanupDxGraphics
forget set ghsemDummyPage to 0 after it been free
Modified:
trunk/reactos/drivers/directx/dxg/main.c
Modified: trunk/reactos/drivers/directx/dxg/main.c
URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/drivers/directx/dxg/main.c…
==============================================================================
--- trunk/reactos/drivers/directx/dxg/main.c (original)
+++ trunk/reactos/drivers/directx/dxg/main.c Fri Dec 28 23:32:30 2007
@@ -14,7 +14,7 @@
#include "dxg_driver.h"
ULONG gcMaxDdHmgr = 0;
-ULONG gcSizeDdHmgr = 0;
+ULONG gcSizeDdHmgr = 0;
LONG gcDummyPageRefCnt = 0;
HSEMAPHORE ghsemHmgr = NULL;
HSEMAPHORE ghsemDummyPage = NULL;
@@ -63,7 +63,7 @@
gcDummyPageRefCnt = 0;
ghsemDummyPage = NULL;
- /*
+ /*
* Setup internal driver functions list we got from dxg driver functions list
*/
pDxgDrv->iDriverVersion = 0x80000; /* Note 12/1-2004 : DirectX 8 ? */
@@ -77,8 +77,8 @@
}
/*
- * Check if all drv functions are sorted right
- * and if it really are exported
+ * Check if all drv functions are sorted right
+ * and if it really are exported
*/
for (i=1 ; i < DXENG_INDEX_DxEngLoadImage + 1; i++)
@@ -119,20 +119,24 @@
return STATUS_NO_MEMORY;
}
+
+
+
NTSTATUS
DxDdCleanupDxGraphics()
{
DdHmgDestroy();
- if (!ghsemDummyPage)
- {
- if (!gpDummyPage)
+ if (ghsemDummyPage != 0 )
+ {
+ if (gpDummyPage != 0 )
{
ExFreePoolWithTag(gpDummyPage,0);
gpDummyPage = NULL;
gcDummyPageRefCnt = 0;
}
EngDeleteSemaphore(ghsemDummyPage);
+ ghsemDummyPage = 0;
}
return 0;
@@ -149,7 +153,7 @@
if (gpentDdHmgr)
{
EngFreeMem(gpentDdHmgr);
- gpentDdHmgr = NULL;
+ gpentDdHmgr = NULL;
}
if (ghsemHmgr)
@@ -179,7 +183,7 @@
if (gpLockShortDelay)
{
- gpLockShortDelay->QuadPart = ((LONGLONG)-100000);
+ gpLockShortDelay->HighPart = -1;
return TRUE;
}
@@ -193,3 +197,6 @@
return FALSE;
}
+
+
+