Author: jimtabor
Date: Wed May 7 13:12:19 2008
New Revision: 33348
URL:
http://svn.reactos.org/svn/reactos?rev=33348&view=rev
Log:
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.
Modified:
trunk/reactos/subsystems/win32/win32k/objects/dc.c
Modified: trunk/reactos/subsystems/win32/win32k/objects/dc.c
URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/subsystems/win32/win32k/ob…
==============================================================================
--- trunk/reactos/subsystems/win32/win32k/objects/dc.c [iso-8859-1] (original)
+++ trunk/reactos/subsystems/win32/win32k/objects/dc.c [iso-8859-1] Wed May 7 13:12:19
2008
@@ -28,7 +28,10 @@
#define NDEBUG
#include <debug.h>
+// --------------------------------------------------------- File Statics
+
static GDIDEVICE PrimarySurface;
+static PGDIDEVICE pPrimarySurface = NULL;
static KEVENT VideoDriverNeedsPreparation;
static KEVENT VideoDriverPrepared;
static PDC defaultDCstate = NULL;
@@ -43,8 +46,6 @@
}
/* FIXME: DCs should probably be thread safe */
-
-// --------------------------------------------------------- File Statics
// ----------------------------------------------------- Public Functions
@@ -361,6 +362,8 @@
DPRINT("Trying to load display driver no. %d\n", DisplayNumber);
RtlZeroMemory(&PrimarySurface, sizeof(PrimarySurface));
+
+ if (!pPrimarySurface) pPrimarySurface = ExAllocatePoolWithTag(PagedPool,
sizeof(GDIDEVICE), TAG_GDIPDEV);
PrimarySurface.VideoFileObject = DRIVER_FindMPDriver(DisplayNumber);