[ros-diffs] [greatlrd] 30963: Fix two smaller bugs in DxDdStartupDxGraphics ------------------------------------------------ fix : use full path to dxg.sys when we trying load it fix : only try unload dxg.sys if it really been load and got a fail status code.

greatlrd at svn.reactos.org greatlrd at svn.reactos.org
Sun Dec 2 18:31:13 CET 2007


Author: greatlrd
Date: Sun Dec  2 20:31:12 2007
New Revision: 30963

URL: http://svn.reactos.org/svn/reactos?rev=30963&view=rev
Log:
Fix two smaller bugs in DxDdStartupDxGraphics
------------------------------------------------
fix : use full path to dxg.sys when we trying load it
fix : only try unload dxg.sys if it really been load and got a fail status code. 



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/ntddraw/ddraw.c?rev=30963&r1=30962&r2=30963&view=diff
==============================================================================
--- trunk/reactos/subsystems/win32/win32k/ntddraw/ddraw.c (original)
+++ trunk/reactos/subsystems/win32/win32k/ntddraw/ddraw.c Sun Dec  2 20:31:12 2007
@@ -50,10 +50,12 @@
     // DxApiGetVersion()
 
     /* Loading the kernel interface of directx for win32k */
-    ghDxGraphics = EngLoadImage(L"drivers\\dxg.sys");
-    if (!ghDxGraphics)
-    {
-		DPRINT1("Warning: dxg.sys not found\n");
+
+    ghDxGraphics = EngLoadImage(L"\\SystemRoot\\System32\\drivers\\dxg.sys");
+    
+    if (ghDxGraphics == NULL)
+    {
+        DPRINT1("Warning: dxg.sys not found\n");
         Status = STATUS_DLL_NOT_FOUND;
     }
     else
@@ -83,8 +85,11 @@
         {
             gpfnStartupDxGraphics = NULL;
             gpfnCleanupDxGraphics = NULL;
-            EngUnloadImage( ghDxGraphics);
-            ghDxGraphics = NULL;
+            if (ghDxGraphics != NULL)
+            {
+                EngUnloadImage( ghDxGraphics);
+                ghDxGraphics = NULL;
+            }
             DPRINT1("Warning: DirectX graphics interface can not be initialized\n");
         }
         else




More information about the Ros-diffs mailing list