Author: jimtabor
Date: Sat Nov 22 12:26:32 2008
New Revision: 37562
URL: http://svn.reactos.org/svn/reactos?rev=37562&view=rev
Log:
- Add tag for path objects. Set DC handle when selecting bitmap.
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/in…
==============================================================================
--- trunk/reactos/subsystems/win32/win32k/include/tags.h [iso-8859-1] (original)
+++ trunk/reactos/subsystems/win32/win32k/include/tags.h [iso-8859-1] Sat Nov 22 12:26:32 2008
@@ -77,6 +77,7 @@
#define TAG_CLIPOBJ TAG('C', 'L', 'P', 'O') /* clip object */
#define TAG_DRIVEROBJ TAG('D', 'R', 'V', 'O') /* driver object */
#define TAG_DFSM TAG('D', 'f', 's', 'm') /* Eng event allocation */
+#define TAG_EPATH TAG('G', 'p', 'a', 't') /* path object */
#define TAG_FONT TAG('F', 'N', 'T', 'E') /* font entry */
#define TAG_FONTOBJ TAG('G', 'f', 'n', 't') /* font object */
#define TAG_WNDOBJ TAG('W', 'N', 'D', 'O') /* window object */
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] Sat Nov 22 12:26:32 2008
@@ -2099,6 +2099,10 @@
/* Release the old bitmap, lock the new one and convert it to a SURF */
pDC->w.hBitmap = hBmp;
+ // If Info DC this is zero and pSurface is moved to DC->pSurfInfo.
+ pDC->DcLevel.pSurface = pBmp;
+ pBmp->hDC = hDC;
+
// if we're working with a DIB, get the palette [fixme: only create if the selected palette is null]
if(pBmp->dib)
{
Author: greatlrd
Date: Sat Nov 22 11:08:55 2008
New Revision: 37560
URL: http://svn.reactos.org/svn/reactos?rev=37560&view=rev
Log:
implement bit more of DCICreatePrimary, it is not finish or tested yet, and comment up the code.
Modified:
branches/reactx/reactos/dll/win32/dciman32/dciman_main.c
Modified: branches/reactx/reactos/dll/win32/dciman32/dciman_main.c
URL: http://svn.reactos.org/svn/reactos/branches/reactx/reactos/dll/win32/dciman…
==============================================================================
--- branches/reactx/reactos/dll/win32/dciman32/dciman_main.c [iso-8859-1] (original)
+++ branches/reactx/reactos/dll/win32/dciman32/dciman_main.c [iso-8859-1] Sat Nov 22 11:08:55 2008
@@ -112,8 +112,10 @@
DDHALINFO HalInfo;
DDHAL_DDPALETTECALLBACKS DDPaletteCallbacks;
+ /* Alloc memory for the internal struct, rember this internal struct are not compatible with windows xp */
if ( (pDciSurface_int = (LPDCISURFACE_INT) HeapAlloc(GetProcessHeap(), HEAP_ZERO_MEMORY, sizeof(DCISURFACE_INT) )) == NULL )
{
+ /* Fail alloc memmory */
retvalue = DCI_ERR_OUTOFMEMORY;
}
else
@@ -135,15 +137,51 @@
NULL,
NULL) == FALSE) )
{
+ /* Fail to get importment Directx informations */
retvalue = DCI_FAIL_UNSUPPORTED;
}
else
{
+ /* We got all informations to start create our primary surface */
+
+ /* Will be use later, it check see if we lost the surface or not */
pDciSurface_int->DciSurface_lcl.LostSurface = FALSE;
/* FIXME Add the real code now to create the primary surface after we create the dx hal interface */
+ /* Fill in the size of DCISURFACEINFO struct */
pDciSurface_int->DciSurfaceInfo.dwSize = sizeof(DCISURFACEINFO);
+
+ /* Fill in the surface is visible, for it always are the primary surface and it is visible */
+ pDciSurface_int->DciSurfaceInfo.dwDCICaps = DCI_VISIBLE;
+
+ /* for primary screen res lower that 256Color, ms dciman.dll set this value to BI_RGB
+ * old note I found in ddk header comment follow dwMask is type for BI_BITMASK surfaces
+ * and for dwCompression it was which format the surface was create in, I also tested with older graphic card like S3
+ * that support 16Color or lower for the primary display. and saw this member change betwin 0 (BI_RGB) and 3 (BI_BITFIELDS).
+ */
+ if (HalInfo.vmiData.ddpfDisplay.dwRGBBitCount >= 8)
+ {
+ pDciSurface_int->DciSurfaceInfo.dwCompression = BI_BITFIELDS;
+ }
+ else
+ {
+ pDciSurface_int->DciSurfaceInfo.dwCompression = BI_RGB;
+ }
+
+ /* Fill in the RGB mask */
+ pDciSurface_int->DciSurfaceInfo.dwMask[0] = HalInfo.vmiData.ddpfDisplay.dwRBitMask;
+ pDciSurface_int->DciSurfaceInfo.dwMask[1] = HalInfo.vmiData.ddpfDisplay.dwGBitMask;
+ pDciSurface_int->DciSurfaceInfo.dwMask[2] = HalInfo.vmiData.ddpfDisplay.dwBBitMask;
+
+ /* Fill in the width and height of the primary surface */
+ pDciSurface_int->DciSurfaceInfo.dwWidth = HalInfo.vmiData.dwDisplayWidth;
+ pDciSurface_int->DciSurfaceInfo.dwHeight = HalInfo.vmiData.dwDisplayHeight;
+
+ /* Fill in the color deep and stride of the primary surface */
+ pDciSurface_int->DciSurfaceInfo.dwBitCount = HalInfo.vmiData.ddpfDisplay.dwRGBBitCount;
+ pDciSurface_int->DciSurfaceInfo.lStride = HalInfo.vmiData.lDisplayPitch;
+
*pDciSurfaceInfo = (LPDCISURFACEINFO) &pDciSurface_int->DciSurfaceInfo;
}
}