mirror of
https://github.com/reactos/reactos.git
synced 2025-02-24 17:34:57 +00:00
Add tests and comments to IntPrepareDriver.
svn path=/trunk/; revision=31575
This commit is contained in:
parent
420a4b869c
commit
83c6c123e8
2 changed files with 20 additions and 2 deletions
|
@ -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 */
|
||||
|
|
|
@ -353,7 +353,7 @@ IntPrepareDriver()
|
|||
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 @@ IntPrepareDriver()
|
|||
}
|
||||
|
||||
/* 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 @@ IntPrepareDriver()
|
|||
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 @@ IntPrepareDriver()
|
|||
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;
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue