From 95bc4a2671a0bc7b7e2a954e079d386a08b74acc Mon Sep 17 00:00:00 2001 From: James Tabor Date: Wed, 7 May 2008 18:12:19 +0000 Subject: [PATCH] Adding more than one video device.. We need to fix NtGdiCreateCompatibleDC and DceCreateDisplayDC so they can access the device name from the default PDev or PrimarySurface. ATM we use L"DISPLAY" not L"\\??\\DISPLAY%d"(<-display number) to create a new HDC. In Gdi32 IntCreateDICW we basicly do the same w/o the display number. This code is correct and please leave it alone. I add some code in win32k dc.c, so we can start the changes. svn path=/trunk/; revision=33348 --- reactos/subsystems/win32/win32k/objects/dc.c | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/reactos/subsystems/win32/win32k/objects/dc.c b/reactos/subsystems/win32/win32k/objects/dc.c index b0fcf14d8d4..d53e35fa9d4 100644 --- a/reactos/subsystems/win32/win32k/objects/dc.c +++ b/reactos/subsystems/win32/win32k/objects/dc.c @@ -28,7 +28,10 @@ #define NDEBUG #include +// --------------------------------------------------------- File Statics + static GDIDEVICE PrimarySurface; +static PGDIDEVICE pPrimarySurface = NULL; static KEVENT VideoDriverNeedsPreparation; static KEVENT VideoDriverPrepared; static PDC defaultDCstate = NULL; @@ -44,8 +47,6 @@ InitDcImpl(VOID) /* FIXME: DCs should probably be thread safe */ -// --------------------------------------------------------- File Statics - // ----------------------------------------------------- Public Functions BOOL STDCALL @@ -362,6 +363,8 @@ IntPrepareDriver() RtlZeroMemory(&PrimarySurface, sizeof(PrimarySurface)); + if (!pPrimarySurface) pPrimarySurface = ExAllocatePoolWithTag(PagedPool, sizeof(GDIDEVICE), TAG_GDIPDEV); + PrimarySurface.VideoFileObject = DRIVER_FindMPDriver(DisplayNumber); /* Open the miniport driver */