Author: jimtabor
Date: Sun Sep 27 05:12:02 2009
New Revision: 43176
URL:
http://svn.reactos.org/svn/reactos?rev=43176&view=rev
Log:
- [NtDDraw]
- Export global DD context size. Create a container for both PDev and EDDG structures.
When allocating PDev and add the DD context size if not zero.
Modified:
trunk/reactos/subsystems/win32/win32k/include/pdevobj.h
trunk/reactos/subsystems/win32/win32k/ntddraw/ddraw.c
trunk/reactos/subsystems/win32/win32k/objects/device.c
Modified: trunk/reactos/subsystems/win32/win32k/include/pdevobj.h
URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/subsystems/win32/win32k/in…
==============================================================================
--- trunk/reactos/subsystems/win32/win32k/include/pdevobj.h [iso-8859-1] (original)
+++ trunk/reactos/subsystems/win32/win32k/include/pdevobj.h [iso-8859-1] Sun Sep 27
05:12:02 2009
@@ -1,5 +1,7 @@
#ifndef __WIN32K_PDEVOBJ_H
#define __WIN32K_PDEVOBJ_H
+
+#include <drivers/directx/directxint.h>
/* PDEVOBJ flags */
#define PDEV_DISPLAY 0x00000001 /* Display device */
@@ -134,4 +136,13 @@
struct _EDD_DIRECTDRAW_GLOBAL * pEDDgpl;
} PDEVOBJ, *PPDEVOBJ;
+/* PDEV and EDDX extra data container.*/
+typedef struct _PDEVEDD
+{
+ PDEVOBJ pdevobj;
+ EDD_DIRECTDRAW_GLOBAL EDDgpl;
+} PDEVEDD, *PPDEVEDD;
+
+extern ULONG gdwDirectDrawContext;
+
#endif /* !__WIN32K_PDEVOBJ_H */
Modified: trunk/reactos/subsystems/win32/win32k/ntddraw/ddraw.c
URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/subsystems/win32/win32k/nt…
==============================================================================
--- trunk/reactos/subsystems/win32/win32k/ntddraw/ddraw.c [iso-8859-1] (original)
+++ trunk/reactos/subsystems/win32/win32k/ntddraw/ddraw.c [iso-8859-1] Sun Sep 27 05:12:02
2009
@@ -22,7 +22,7 @@
DRVFN gpDxFuncs[DXG_INDEX_DxDdIoctl];
HANDLE ghDxGraphics = NULL;
-ULONG gdwDirectDrawContext;
+ULONG gdwDirectDrawContext = 0;
#define DXDBG 1
Modified: trunk/reactos/subsystems/win32/win32k/objects/device.c
URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/subsystems/win32/win32k/ob…
==============================================================================
--- trunk/reactos/subsystems/win32/win32k/objects/device.c [iso-8859-1] (original)
+++ trunk/reactos/subsystems/win32/win32k/objects/device.c [iso-8859-1] Sun Sep 27
05:12:02 2009
@@ -229,7 +229,7 @@
RtlZeroMemory(&PrimarySurface, sizeof(PrimarySurface));
-// if (!pPrimarySurface) pPrimarySurface = ExAllocatePoolWithTag(PagedPool,
sizeof(PDEVOBJ), TAG_GDIPDEV);
+// if (!pPrimarySurface) pPrimarySurface = ExAllocatePoolWithTag(PagedPool,
gdwDirectDrawContext + sizeof(PDEVOBJ), TAG_GDIPDEV);
PrimarySurface.VideoFileObject = DRIVER_FindMPDriver(DisplayNumber);