[ros-diffs] [jimtabor] 31575: Add tests and comments to IntPrepareDriver.

jimtabor at svn.reactos.org jimtabor at svn.reactos.org
Thu Jan 3 00:04:32 CET 2008


Author: jimtabor
Date: Thu Jan  3 02:04:31 2008
New Revision: 31575

URL: http://svn.reactos.org/svn/reactos?rev=31575&view=rev
Log:
Add tests and comments to IntPrepareDriver.

Modified:
    trunk/reactos/subsystems/win32/win32k/include/tags.h
    trunk/reactos/subsystems/win32/win32k/objects/dc.c

Modified: trunk/reactos/subsystems/win32/win32k/include/tags.h
URL: http://svn.reactos.org/svn/reactos/trunk/reactos/subsystems/win32/win32k/include/tags.h?rev=31575&r1=31574&r2=31575&view=diff
==============================================================================
--- trunk/reactos/subsystems/win32/win32k/include/tags.h (original)
+++ trunk/reactos/subsystems/win32/win32k/include/tags.h Thu Jan  3 02:04:31 2008
@@ -33,6 +33,8 @@
 #define TAG_CLIP	TAG('C', 'L', 'I', 'P') /* clipping */
 #define TAG_COORD	TAG('C', 'O', 'R', 'D') /* coords */
 #define TAG_DC		TAG('D', 'C', 'D', 'C') /* dc */
+#define TAG_GDIDEV	TAG('G', 'd', 'e', 'v') /* gdi dev support*/
+#define TAG_GDIPDEV	TAG('G', 'D', 'e', 'v') /* gdi PDev */
 #define TAG_GDIOBJ	TAG('G', 'D', 'I', 'O') /* gdi obj */
 #define TAG_GDIHNDTBLE	TAG('G', 'D', 'I', 'H') /* gdi handle table */
 #define TAG_GDIICM	TAG('G', 'i', 'c', 'm') /* gdi Icm */

Modified: trunk/reactos/subsystems/win32/win32k/objects/dc.c
URL: http://svn.reactos.org/svn/reactos/trunk/reactos/subsystems/win32/win32k/objects/dc.c?rev=31575&r1=31574&r2=31575&view=diff
==============================================================================
--- trunk/reactos/subsystems/win32/win32k/objects/dc.c (original)
+++ trunk/reactos/subsystems/win32/win32k/objects/dc.c Thu Jan  3 02:04:31 2008
@@ -353,7 +353,7 @@
          ret = PrimarySurface.PreparedDriver;
       goto cleanup;
    }
-
+   // HAX! Fixme so I can support more than one! So how many?
    for (DisplayNumber = 0; ; DisplayNumber++)
    {
       DPRINT("Trying to load display driver no. %d\n", DisplayNumber);
@@ -445,6 +445,7 @@
       }
 
       /* Allocate a phyical device handle from the driver */
+      // Support DMW.dmSize + DMW.dmDriverExtra & Alloc DMW then set prt pdmwDev.
       PrimarySurface.DMW.dmSize = sizeof (PrimarySurface.DMW);
       if (SetupDevMode(&PrimarySurface.DMW, DisplayNumber))
       {
@@ -503,6 +504,17 @@
          PrimarySurface.DMW.dmDisplayFrequency = PrimarySurface.GDIInfo.ulVRefresh;
       }
 
+      if (!PrimarySurface.DMW.dmDriverExtra)
+      {
+         PrimarySurface.pdmwDev = &PrimarySurface.DMW; // HAX!
+      }
+      else
+      {
+         DPRINT1("WARNING!!! Need to Alloc DMW !!!!!!\n");
+      }
+      // Dont remove until we finish testing other drivers.
+      DPRINT1("DMW extra %x !!!!!!\n",PrimarySurface.DMW.dmDriverExtra);
+
       if (0 == PrimarySurface.GDIInfo.ulLogPixelsX)
       {
          DPRINT("Adjusting GDIInfo.ulLogPixelsX\n");
@@ -531,7 +543,11 @@
       PrimarySurface.DisplayNumber = DisplayNumber;
       PrimarySurface.flFlags = PDEV_DISPLAY; // Hard set,, add more flags.
       PrimarySurface.hsemDevLock = (PERESOURCE)EngCreateSemaphore();
-      PrimarySurface.ppdevNext = NULL; // Fixme! We need to support more than display drvs.
+      // Should be null,, but make sure for now.
+      PrimarySurface.pvGammaRamp = NULL;
+      PrimarySurface.ppdevNext = NULL;    // Fixme! We need to support more than display drvs.
+      PrimarySurface.ppdevParent = NULL;  // Always NULL if primary.
+      PrimarySurface.pGraphicsDev = NULL; // Fixme!
       ret = TRUE;
       goto cleanup;
    }




More information about the Ros-diffs mailing list